[fpc-devel] Issue #33603: new feature to check valid enum values

Ondrej Pokorny lazarus at kluug.net
Sun May 12 09:39:09 CEST 2019


[Continued from the "Dangerous optimization in CASE..OF" thread]

On 13.04.2018 12:52, Ondrej Pokorny wrote:
> I introduced the AS operator for enumerators in 
> https://bugs.freepascal.org/view.php?id=33603


It's already been a year since I posted this patch and still haven't 
received any feedback about /the patch/ from the developers.

The only feedback about /the idea/ was:
1.) from Jonas M. 2017-07-02, 18:49 CET (before I sent the patch): "I 
would be in favour of a new intrinsic.", which he justified with the 
(wrong) assumption that the AS-operator could be overloaded and thus the 
new AS operator could break legacy code.

2.) Michael V.C. 2018-04-14 10:24 CET: "I am all for it [compiler 
intrinsic], although I think the 'as' syntax is more elegant, and that
has my preference."

All in all the idea to have an easy way to check a valid enum value was 
positively received.

Can anybody from the compiler developers comment on the patch? In detail:
1.) Will this idea be applied into FPC?
   1a.) If yes, what are the problems with the patch that hinder the 
patch to be applied?
   1b.) If no, please resolve the issue report as "won't fix".

I am willing to rework the patch but without any feedback it's just a 
waste of time.

Ondrej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190512/c4b23d40/attachment.html>


More information about the fpc-devel mailing list