[fpc-devel] Dangerous optimization in CASE..OF

Marco van de Voort marcov at stack.nl
Sun Jul 2 16:48:08 CEST 2017


In our previous episode, Martok said:
> It is really hard to write code that interacts with the outside world without
> having a validation problem.

Then you arguing wrong. Then you don't need validation everywhere, but
something you can call to simply confirm an enum has correct values after
reading.

It is not logical to have heaps of checks littered everywhere if the
corruption happens in a defined place (on load).

Worse, tying it to range check would then have heaps of redundant checking
everywhere, not just enums.



More information about the fpc-devel mailing list