News for hackers. Stuff that matters.
Re:AI Found a Bug in My Code by WalterBright on Thursday November 17, 2022 @12:58AM (#33635502)
A programming language with no redundancy in it means the compiler cannot detect any errors - because every sequence of characters forms a valid program.

The skill is in selecting the optimal amount and form of redundancy.

For example, the typical ; statement terminator is redundant. People often ask, since it is redundant, why not remove it? People have tried that, and found out that the redundancy makes for far better error detection.

Re:AI Found a Bug in My Code by lmm on Thursday November 17, 2022 @01:10AM (#33635583)
On that specific example, not my experience at all. (The general point is of course valid, though I think it follows very directly from what I said)
Re:AI Found a Bug in My Code by pharmakom on Thursday November 17, 2022 @04:01AM (#33636518)
Semicolon is a strange example when so many successful languages don’t have them.

I think a better example is CoffeeScript, where almost any string is a valid program but probably not the one you wanted.

Re:AI Found a Bug in My Code by WalterBright on Thursday November 17, 2022 @04:31PM (#33646049)
> Semicolon is a strange example when so many successful languages don’t have them.

They usually have another statement terminator instead, like a newline.

Re:AI Found a Bug in My Code by amelius on Thursday November 17, 2022 @05:58AM (#33637286)
No, with redundancy your compiler can catch a certain class of errors (call them "avoidable") that doesn't exist in case of no redundancy. Of course, in both cases you still have the unavoidable errors.