Re: Undefined behaviour, was: for or against equality

George Neuner <gneuner2@comcast.net>
Tue, 11 Jan 2022 22:01:37 -0500

          From comp.compilers

Related articles
Undefined behaviour, was: for or against equality martin@gkc.org.uk (Martin Ward) (2022-01-07)
Re: Undefined behaviour, was: for or against equality david.brown@hesbynett.no (David Brown) (2022-01-07)
Re: Undefined behaviour, was: for or against equality spibou@gmail.com (Spiros Bousbouras) (2022-01-08)
Re: Undefined behaviour, was: for or against equality anton@mips.complang.tuwien.ac.at (2022-01-08)
Re: Undefined behaviour, was: for or against equality david.brown@hesbynett.no (David Brown) (2022-01-09)
Re: Undefined behaviour, was: for or against equality 480-992-1380@kylheku.com (Kaz Kylheku) (2022-01-11)
Re: Undefined behaviour, was: for or against equality gneuner2@comcast.net (George Neuner) (2022-01-11)
| List of all articles for this month |

From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Tue, 11 Jan 2022 22:01:37 -0500
Organization: A noiseless patient Spider
References: <17d70d74-1cf1-cc41-6b38-c0b307aeb35a@gkc.org.uk> 22-01-016 22-01-018 <7f4f52f2-49ee-9e80-1f03-c3fb9c74f574@gkc.org.uk> 22-01-029 22-01-033 22-01-043
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="46913"; mail-complaints-to="abuse@iecc.com"
Keywords: standards, Lisp
Posted-Date: 12 Jan 2022 17:51:05 EST

On Tue, 11 Jan 2022 16:55:54 -0000 (UTC), Kaz Kylheku
<480-992-1380@kylheku.com> wrote:


>On 2022-01-08, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> David Brown <david.brown@hesbynett.no> writes:
>>>Undefined behaviour, as far as language standards are concerned, are
>>>omnipresent in programming - for all languages.
>>
>> Please prove this astounding assertion. My impression is that managed
>> languages define everything, at least to some extent, and leave
>> nothing undefined. If they allowed nasal demons, the appeal of
>> managed languages would evaporate instantly.
>
>The Lisp-like programming language Scheme has unspecified order of
>argument evaluation. And you can stuff side effects into argument
>expressions, like in C.


In Scheme the order of evaluation for let expressions similarly is
unspecified.


There is at least one Scheme which deliberately randomizes the order
of function argument and let evaluation. And there are parallel
Schemes which evaluate function arguments and lets in parallel.




>Its built-in imperative have undefined return values.
>
>ANSI Common Lisp leaves the effects undefined of modifying literals,
>just like C. ANSI Lisp code that perpetrates some kind of error is
>safe only if compiled in safe mode; if you compile with reduced safety,
>e.g. (declare (optimize (safety 0))), then error become undefined
>behavior, including type errors. If you declare that some quantity is
>a fixnum integer, and request safety 0 speed 3, and then it turns
>out that it's other than an integer, woe to that code.
>However, in these cases you're invoking the safety escape hatch;
>it's not like C where you are shackled by chains of undefined behavior
>which make themselves felt every time you squirm.


And Lisp's optimization settings can be changed per function or per
compilation unit as well as globally. ["declaim" vs "declare"]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.