[fpc-devel] [Suggestion] Enumeration range-check intrinsic
Michael Van Canneyt
michael at freepascal.org
Fri Jul 5 11:33:59 CEST 2019
On Fri, 5 Jul 2019, Ondrej Pokorny wrote:
>
> On 05.07.2019 10:52, Sven Barth via fpc-devel wrote:
>> Michael Van Canneyt <michael at freepascal.org
>> <mailto:michael at freepascal.org>> schrieb am Fr., 5. Juli 2019, 10:47:
>>
>> If memory serves well, FPC introduced this (before delphi) to be
>> able to import C enums with assigned values.
>>
>>
>> Correct. That is also why we allow both "=" and ":=" for the value
>> assignments. Because Delphi only supports one of the two and we picked the
>> other back then. ;)
>
> Ignorant Delphi core developers have never checked how FPC does things before
> implementing their own solution to keep compatibility ;) And then they added
> ARC, then they removed ARC, they then added 0-based strings, then they killed
> the product (AppMethod) they made it for... Unfortunately the 0-based string
> features made it into FPC in TStringHelper as well...
TStringHelper is for delphi compatibility, so there is no choice.
All in all, I am still of the opinion that the whole SysUtils unit is a
monster that should be taken apart and its functionality spread over various
units: StrUtils, DateUtils, IOUtils, Exceptions, Helpers.
Doing so would also release us from the need to be Delphi compatible in those
units. Alas, this is meanwhile a huge undertaking.
Michael.
More information about the fpc-devel
mailing list