JEP 430: String Templates Mandatory TemplateProcessor
tom L
tom_L64 at hotmail.com
Mon May 15 22:09:48 UTC 2023
Hello,
I personally like this syntax of \{}, I also agree with the arguments that were said before, but there are a few topics that I I didn’t find in the previous mails, and while they be minor issues, I wanted to share them:
So recently, I talked with someone who is dyslexic, and he said that he struggles to read such a sequence of characters. There are other characters, like $, §, #, @, that are way easier to read.
Also, a very minor one, \ is a bit annoying to type in a AZERTY keyboard, you have to do right-alt + 8.
Tom
________________________________
De : amber-dev <amber-dev-retn at openjdk.org> de la part de Remi Forax <forax at univ-mlv.fr>
Envoyé : lundi 15 mai 2023 16:03
À : Duncan MacGregor <duncan.macgregor at servicenow.com>
Cc : amber-dev <amber-dev at openjdk.org>
Objet : Re: JEP 430: String Templates Mandatory TemplateProcessor
________________________________
From: "Duncan MacGregor" <duncan.macgregor at servicenow.com>
To: "amber-dev" <amber-dev at openjdk.org>
Sent: Monday, May 15, 2023 1:03:37 PM
Subject: Re: JEP 430: String Templates Mandatory TemplateProcessor
I don’t understand the dislike for \{ either. Ruby uses #{, Swift uses \(, Python uses $, or { depending on whether you’re using f-strings, and so on. I use all of these at least semi-regularly and none of these is particularly ugly and all are abundantly clear if your IDE or editor supports correct syntax highlighting. I wouldn’t mind discussion of the syntax if it were more nuanced than “\{} 冷” (actual reddit comment), but I think until we see better arguments than, “Kotlin does it this way,” I’m not sure it’s valuable.
I've recently discussed with someone that choose to use ${} as a syntax for his template library.
The given reason is that '$' is seen as a pseudo character, so it works well in strings that uses the usual delimiters like :, ;, / or \ because it visually keeps the structure.
Now, Brian, the spec lead, said that the escape sequence is \{...} so it is.
Let's wait and see at least until 21 is released, at that points more people will use the feature, so the feedback will be more based on actual users.
Duncan.
Rémi
From: amber-dev <amber-dev-retn at openjdk.org> on behalf of Jim Laskey <james.laskey at oracle.com>
Date: Saturday, 13 May 2023 at 16:19
To: interlink.sg7 at gmail.com <interlink.sg7 at gmail.com>
Cc: amber-dev at openjdk.org <amber-dev at openjdk.org>
Subject: Re: JEP 430: String Templates Mandatory TemplateProcessor
[External Email]
________________________________
Note that there is a very strong backlash against the backslash (play on words intended) in the Java community.
Depends on who you hang out with. I know the Swift crowd seem content with \(. Not sure I see the point of making all languages the same.
Like any new language feature, you do get use to \{. Once IDEs integrate, string templates will become second nature.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230515/53610200/attachment-0001.htm>
More information about the amber-dev
mailing list