Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-05

Issue #33603: new feature to check valid enum values

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ondrej Pokorny

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

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

Reply by email