On 2023-08-31 18:19, Ondrej Pokorny via fpc-devel wrote:
On 31.08.2023 17:54, Tomas Hajny via fpc-devel wrote:
.
.
2) Always use the ansistring version when parsing the comments.
Obviously, this increases compilation time for directives parsing
somewhat - we could possibly measure the impact and then decide if the
increase is important.
That is actually what I started with. Then I saw that there are some
parts of the code that demand ShortString output and decided to keep
both versions.
But basically it is possible to have the 2 ShortString variants use
the new Long variants + check the Length and valid characters (to me
.
.
Yes, that's what I meant by option 2 - I realize that most cases need to
end up in shortstrings anyway.
Or the bigger step would be to make the compiler unicode-ready:
var
ä: string;
+ file names, paths etc.
Then only the new Long variant would be needed :)
Apparently not only the compiler Unicode-ready, but also the language.
Looking forward to identifiers looking like characters having specific
meaning in Pascal, but differing in their Unicode codes (e.g. m-dash).
Or maybe rather not... I'm sure it would be a good approach to provide
enough room for compilers of some other languages to finish their
compilation in time comparable to FPC... ;-)
Tomas
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel