[fpc-devel] Current "state of opinion" on multiline strings?

Michael Van Canneyt michael at freepascal.org
Sun Dec 22 11:08:06 CET 2024



On Sat, 21 Dec 2024, Ben Grasset via fpc-devel wrote:

> Facts:
> - Michael VC did not originally like the entire idea at all, if I recall
> correctly. However, he eventually added an implementation of it to Pas2JS
> that works literally the exact same as my main FPC compiler one does.
> - Delphi (in the time since, as of version 12 I guess) has added this
> themselves. Their version is not quite the same (frankly in my opinion,
> theirs is overall worse than mine, for reasons such as the fact you HAVE to
> put the closing backticks of a multiline string on their own entire line in
> Delphi, whereas in my version the closing backticks could appear anywhere
> and be parsed correctly. And so on and so forth).
>
> I'm as ready as I was several years ago to put this in main FPC if it'll be
> accepted, however, would people want me to now imitate the Delphi
> version (which again did not exist when I originally implemented the
> functionality for FPC, and again is functionally different from both the
> unmerged main compiler impl of mine and Michael VCs identical
> actually-existing impl for Pas2JS).

I implemented the Delphi version in pas2js as well meanwhile (on demand), 
So both work.

I personally prefer the backtick version, it is easier to use. 
but nothing prevents us from having both as in pas2js. 
The implementation can be orthogonal.

If you can change your implementation to actually support both ways, then
I'll make sure it is merged in the FPC compiler.

Michael.


More information about the fpc-devel mailing list