Attila Kovacs 629 Posted September 21, 2023 1 hour ago, Kas Ob. said: but we can control the compiler to handle the encoding as literal in the generated binary of course we can, where is the problem? Share this post Link to post
Kas Ob. 121 Posted September 21, 2023 24 minutes ago, Attila Kovacs said: of course we can, where is the problem? Are you low on caffeine ? This is not the point of talk, i want what on the text to be converted at build/compile time to different codepage or encoding, like i want my constant multi line string to be an ansistring or/with specific code page no matter what the source file encoding was. I want to ditch using resource file with resource editor to add my long multiline scripts in an exe instead without losing the visibility and readability of them due the ',+ and #13#10 on every line and without adding spaces, i want to see them in the IDE as they are. Same goes for HTML code. Share this post Link to post
Attila Kovacs 629 Posted September 21, 2023 And here we go, that's what I was referring to: every piece of trash you find. Share this post Link to post
Sherlock 663 Posted September 21, 2023 Slow your horses folks. Let's keep it clean and neutral. 1 Share this post Link to post
Uwe Raabe 2057 Posted September 21, 2023 12 hours ago, Rollo62 said: if you want "line" breaks, you should be able to define what kindof ( None, Space, CrLf, Lf, Cr, ...). 10 hours ago, Attila Kovacs said: I'm laughing my pants off at your suggestion to support multiple encodings and line endings in one text file. The line breaks in the code is always CR/LF as that is Windows standard, but you can define the line breaks that the compiler uses to make a string out of it. As string is always Unicode, there is nothing to define. Whatever you need the string for has to take care that it is converted to the correctly encoded byte sequence. It seems that quite some part of this discussion is missing the target. The feature is about line breaks inside string literals, which previously could only be created by concatenating strings and line breaks. The new syntax allows an easier way to write (and paste) with the benefit of better readability. And finally, if someone doesn't like it there is no obligation to use it. Share this post Link to post
Attila Kovacs 629 Posted September 21, 2023 5 minutes ago, Uwe Raabe said: The line breaks in the code is always CR/LF as that is Windows standard, but you can define the line breaks that the compiler uses to make a string out of it. As string is always Unicode, there is nothing to define. Whatever you need the string for has to take care that it is converted to the correctly encoded byte sequence. Aham, and whats about diffent platforms? is it possible to set up the line break with directives? Share this post Link to post
Uwe Raabe 2057 Posted September 21, 2023 I will try to reveal not too much, but I expect these questions to have satisfying answers with the release. Share this post Link to post
Attila Kovacs 629 Posted September 21, 2023 I'm confident that the team is doing an excellent job. Share this post Link to post
Rollo62 536 Posted September 22, 2023 (edited) On 9/21/2023 at 10:25 AM, Attila Kovacs said: ... It's already pretty strange, ... I never said anything different, and I dislike the ugliness in the same way. But you must agree, that the usefulness of such configurable addition of string structures would be a great thing. Now you only can do this conversion part by external tools BEFORE design time and need additional correction DURING runtime, or you convert strange structures strings DURING runtime. My point is, if Embarcadero puts a lot of effort into multi-strings, then I'm asking what main purpose this should solve ? With a little extra effort, this could be maybe usable in a lot of cases, like (JSON, HTML, XML, Python, whatsoever ). This is intended as a brain teaser, I'm not asking for any of these additions. I'm afraid, this soon will end into the same pro- and contra discussions, as for the inline variables. Edited September 22, 2023 by Rollo62 Share this post Link to post
Attila Kovacs 629 Posted September 22, 2023 18 minutes ago, Rollo62 said: then I'm asking what main purpose this should solve I know it! All the SQL queries go there. Nobody else needs this. 1 Share this post Link to post
Lajos Juhász 293 Posted September 22, 2023 22 minutes ago, Rollo62 said: My point is, if Embarcadero puts a lot of effort into multi-strings, then I'm asking what main purpose this should solve ? That's easy. The only reason is that they can say that finally managed to copy it from other languages. Lately that's the only driving force behind the R&D. 1 Share this post Link to post
dummzeuch 1505 Posted September 22, 2023 13 minutes ago, Attila Kovacs said: I know it! All the SQL queries go there. Nobody else needs this. No, there are other kinds of strings where this could be usefull, e.g. JSON or CSV data for e.g. unit tests. Share this post Link to post
Sherlock 663 Posted September 22, 2023 9 minutes ago, Lajos Juhász said: That's easy. The only reason is that they can say that finally managed to copy it from other languages. Lately that's the only driving force behind the R&D. To be honest, that is also the only driving force behind change requests (language XY has it) as well - hyperbolically speaking. Share this post Link to post
Rollo62 536 Posted September 22, 2023 17 hours ago, Uwe Raabe said: I will try to reveal not too much, but I expect these questions to have satisfying answers with the release. Maybe you are right. https://blog.marcocantu.com/blog/2023-09-yukonbeta-stringliterals.html Share this post Link to post