Found on proggit: Krug, a new experimental programming language, compiler written in D

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Apr 27 00:18:05 UTC 2018


On Thu, Apr 26, 2018 at 04:26:30PM -0700, Walter Bright via Digitalmars-d wrote:
[...]
> Having redundancy in the syntax makes for better, more accurate error
> diagnostics. In the worst case, for a language with zero redundancy,
> every sequence of characters is a valid program. Hence, no errors can
> be diagnosed!
> 
> Besides, redundancy can make a program easier to read (English has a
> lot of it, and is hence easy to read).

People often complain about how redundant natural languages are... not
realizing that it actually provides, in addition to being easier to
read, some degree of built-in error-correction and resilience in a lossy
medium.  Think of reading a text that has occasional typos or omitted
words.  Most of the time, you can still figure out what it's saying in
spite of the "syntax errors".  Or talking over the phone with lots of
static noise.  You can still make out what the other person is saying,
even if some words are garbled.  Computer languages aren't quite at that
level of self-correctiveness and resilience yet, but I'd like to think
we're on the way there.

Redundancy is not always a bad thing.


> And I don't know about others, but I read code an awful lot more than
> I write it.

Yes, something language designers often fail to account for.

Well, many programmers also tend to write without the awareness that 5
months later, someone (i.e., themselves :-D) will be staring at that
same piece of code and going "what the heck was the author thinking when
he wrote this trash?!".


> I posit that redundancy is something programmers learn to appreciate
> as they gain experience, and that eliminating redundancy is something
> new programmers think is a new idea :-)
> 
> P.S. Yes, excessive redundancy and verbosity can be bad. See COBOL.

And Java. ;-)


T

-- 
INTEL = Only half of "intelligence".


More information about the Digitalmars-d mailing list