<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Jonas Maebe <<a href="mailto:jonas@freepascal.org">jonas@freepascal.org</a>> schrieb am Do., 4. Juli 2019, 21:21:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 03/07/2019 09:26, Ondrej Pokorny wrote:<br>
> On 02.07.2019 23:34, Jonas Maebe wrote:<br>
>> Invalid data means undefined behaviour, always. "is" is not a special<br>
>> case that is immune to this.<br>
> <br>
> Don't you really see the need to handle invalid data with a /defined/<br>
> behavior?<br>
<br>
My point is that is impossible to do so, so trying to do it in a way<br>
that works in some/most cases, is much more dangerous than categorically<br>
refusing to try to do it, as it creates a false sense of security.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Then how would you read data from e.g. a stream into an enum or subrange if the stream may contain invalid data? </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>