Fear of Compiler Magic

Timon Gehr timon.gehr at gmx.ch
Sun Aug 4 17:09:07 UTC 2024


On 8/3/24 18:54, Walter Bright wrote:
> On 8/2/2024 1:34 AM, Timon Gehr wrote:
>> Well, this is what assert does. The question is how it achieves it, 
>> and whether the same tools are accessible to user code that perhaps 
>> does _something different than assert_.
> 
> One reason for some of the builtin stuff is to not tempt people to write 
> their own. Having standardized ways to do common tasks is a big win for 
> making code understandable by others, which advantageous in a team 
> environment.
> ...

Sure, I am in favor of built-in assert. This thread is however about magic.

> For example, the `debug` conditionals came about from my discussions 
> with a veteran Microsoft programming manager. He complained that every 
> project invented their own scheme for doing debug conditionals, making 
> it unnecessarily difficult to share code.
> 
> Unittests and Ddoc are other successful examples.
> ...

Off-topic, but yes.

> Lisp is a language that enables building one's one programming language 
> on top of it. It more or less requires it.
> 
> The result is every Lisp user invents their own language, incompatible 
> with any other Lisp user, and so successful Lisp programs don't survive 
> their creators. It's why Lisp has never really caught on, much to the 
> bafflement of Lisp advocates.

Sure.


More information about the Digitalmars-d mailing list