[fpc-devel] new string - question on usage

Alex Shishkin alexvins at mail.ru
Thu Oct 13 10:34:38 CEST 2011


13.10.2011 11:30, Sven Barth пишет:
> Am 13.10.2011 04:30, schrieb Hans-Peter Diettrich:
>> Martin Schreiber schrieb:
>>
>>>> Well, with Delphi 2009's Unicode support, the Delphi language now
>>>> supports Unicode too. Thus unit names, class names, property names,
>>>> variable names etc can all contain Unicode text in there names. So yes,
>>>> Unicode is required throughout the Object Pascal language, and FPC
>>>> Compiler.
>>>
>>> Is this desirable? What is the benefit of non ASCII Pascal identifiers
>>> at the expense of performance and simplicity?
>>
>> Perhaps it's an attempt to better interface with .NET, Java or
>> ObjectiveC?
>
> I don't think so as AFAIK all three don't support unicode characters in
> identifiers.
>
> Regards,
> Sven
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
According to ECMA-335 "Common Language Infrastructure (CLI), 5th edition 
chapter 8.5.1" .NET allow unicode in identifiers.

CLS Rule 4: Assemblies shall follow Annex 7 of Technical Report 15 of 
the Unicode Standard 3.0 governing the set of characters permitted to 
start and be included in identifiers, available on-line at 
http://www.unicode.org/unicode/reports/tr15/tr15-18.html. Identifiers 
shall be in the canonical format defined by Unicode Normalization Form 
C. For CLS purposes, two identifiers are the same if their lowercase 
mappings (as specified by the Unicode locale-insensitive, one-to-one 
lowercase mappings) are the same. That is, for two identifiers to be 
considered different under the CLS they shall differ in more than simply 
their case. However, in order to override an inherited definition the 
CLI requires the precise encoding of the original declaration be used.




More information about the fpc-devel mailing list