Fear of Compiler Magic

Walter Bright newshound2 at digitalmars.com
Sat Aug 3 16:54:25 UTC 2024


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.

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.

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.


More information about the Digitalmars-d mailing list