On 15/07/17 21:33, laza...@kluug.net wrote:
Am Sa., Jul. 15, 2017 21:07 schrieb Jonas Maebe <jo...@freepascal.org>:
I have said from the start that it is possible to store invalid values
in variables through the use of a.o. pointers (which is what the class
zeroing does), explicit typecasts and assembly.
In this case you must not restrict us to work with invalid values in a
deterministic way.
You can if you always use explicit typecasts to different types and
access everything through pointers and assembly. But then the question
is why you want to use a restrictive type in the first place.
Either you declare a type as only holding a limited set of data when
valid and assume it behaves as such, or you don't. A mixture is the
worst of both worlds: no type safety and unexpected behaviour when
something else assumes the type declaration actually means what is written.
Jonas
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel