[fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

Ben Grasset operator97 at gmail.com
Sat Jul 6 20:19:48 CEST 2019


On Sat, Jul 6, 2019 at 1:52 PM Ryan Joseph <genericptr at gmail.com> wrote:

> Just thought of something. Why would it be a bad idea to have a switch
> like H+ that makes all single quoted strings become multiline? I can’t
> think of a reason off the top of my head which would mess up any of my
> programs if suddenly strings were allowed to be more than one line.
>

Notwithstanding the fact that I'm 100% certain that would never be
accepted, given the relative level of controversy that exists even over my
implementation as it exists, I just don't think that's really worth it. The
backtick does not make it any more unwieldy IMO as it is still just one
character.

Also, I'm not sure that could be implemented without introducing way too
many checks that would ultimately have at least a minorly noticeable impact
of compiler performance.

The backtick way allows the implementation to stay relatively
straightforward and lightweight.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190706/b500b75b/attachment.html>


More information about the fpc-devel mailing list