Carmack about static analysis

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Dec 24 12:19:47 PST 2011


On 12/24/11 9:54 AM, Derek wrote:
> I'm sure you are totally correct; I'm not really a C++ coder. And I'm
> sure you also process the specialist/expert level of D knowledge to make
> reading contemporary D code a non-issue.

Well I'm also a specialist in C++, actually more so than D as I have 
longer experience with C++ and wrote more code in it.

> But when compared to spoken
> language text, D code can appear quite obtuse to average coders. And I
> believe this is main do to the very high use of non-alphabetic symbols
> and a level of overloading of both punctuation characters and reserved
> words.

This issue (analogy with human language) has been a long preoccupation 
of me. I have ended up at an odd point - I lost interest.

Analogies of programming language with human language are flawed and 
take nowhere interesting. The only text that gets close to the level of 
precision and non-ambiguity needed is legal text; reading any amount of 
legal text blunts one's desire to be more like it.

Second, natural language text has a very different use pattern. A body 
of natural language text is meant to be written once and then read many 
times; the notion that people need to maintain, enhance, and modify a 
large body of natural language text is quite foreign. It follows that 
programming language code must optimize for different directions.

Third, analogy with math is inevitable; math is the most concise means 
known by humankind to encode theories. A good part of mathematics is 
dedicated to inventing good notation, and math notations have inevitably 
shunned natural language.


Andrei


More information about the Digitalmars-d mailing list