Re: Feature "Multiline strings" added

Michael Van Canneyt via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>

On Mon, 28 Jul 2025, Hairy Pixels via fpc-pascal wrote:

> On Jul 28, 2025 at 1:04:49 AM, Michael Van Canneyt via fpc-pascal <
> [email protected]> wrote:
>
>> Personally, I prefer the backtick solution.
>> The triple quote is slow, it requires postprocessing the string.
>> The backtick solution needs only one pass.
>>
>> <rant>
>> I positively HATE it when people start treating whitespace as
>> significant. No YAML or Python for me on that account alone.
>> The triple quote solution (presumably Python inspired)
>> is a totally braindead and retarded solution as far as I am concerned.
>> </rant>
>>
>
> Maybe I missed something, aren’t both the string types identical in how
> they function? I don’t understand how there could be multiple passes.

Because the amount of whitespace to remove at the start of every line 
is determined by the amount of spaces before the closing triple quotes.

Ergo, you can only strip the whitespaces at the start of every line 
after the whole string was parsed and you have determined the
number of whitespace characters to remove from every line... 
-> 2 passes.

Michael.

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.