[fpc-devel] The (near) future of strings

Sven Barth pascaldragon at googlemail.com
Mon Mar 7 21:08:40 CET 2016


Am 07.03.2016 19:16 schrieb "Michael Van Canneyt" <michael at freepascal.org>:
>
>
>
> On Mon, 7 Mar 2016, Marco van de Voort wrote:
>
>> In our previous episode, Michael Van Canneyt said:
>>>>
>>>>
>>>> However in Michael's scheme with Sysutils using Ansi and
System.Sysutils
>>>> using unicodestring this will fail.
>>>
>>>
>>> Why would this fail ? All we need to do is introduce -NS ?
>>
>>
>> If you have a mix of generations (as is currently possible with Delphi),
how
>> do you avoid linking in two different sysutils?
>>
>>> And obviously the 2 RTLs cannot be mixed.
>>
>>
>> Correct. And if they only differ in name, dotted or not, and you can
>> set namespaces to override the dots, how do you keep them apart?
>
>
> We probably agree that trying to mix both approaches (dotted, non-dotted)
is a recipe for disaster.
>
> So, different directories, and different compiler configs must be used,
obviously.
>
> I never had the intention of having all this in 1 directory.
>
> i.e. we distribute
>
> /usr/local/lib/fpc/4.0.0/x86_64-linux/XYZ
>
> /usr/local/lib/fpc/4.0.0/x86_64-linux/dotted/XYZ
>
> But only one is referenced in fpc.cfg :
>
> #IFDEF NAMESPACED
> /usr/local/lib/fpc/4.0.0/x86_64-linux/dotted/XYZ
> #ELSE
> /usr/local/lib/fpc/4.0.0/x86_64-linux/XYZ
> #ENDIF
>
> where the -NS switch defines NAMESPACED
>
> (or whatever)

That shouldn't be something that depends on the namespace switch (the
proper FPC parameter would probably be -FN by the way if it isn't used
yet). What about people that want to use the ANSI RTL, but also use dotted
names, because they exist in 3.0.0 and also want to use a namespace prefix?
Or other combinations? No, it should be explicitely determined by the user
whether she wants Unicode or not (even if it should just be a -dUNICODERTL
that is handled by the fpc.cfg).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160307/42252583/attachment.html>


More information about the fpc-devel mailing list