Bad Programming Language Ideas
-
I found (warning, PDF) this article[^] quite intriguing. The article is a short history of some good ideas and bad ideas in computer hardware, architectures, and programming languages. Some choice quotes:
-
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
-
A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957 and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x. Algol corrected this mistake by the simple solution: Let assignment be denoted by “:=”. Perhaps this may appear as nitpicking to programmers who got used to the equal sign meaning assignment. But mixing up assignment and comparison is a truly bad idea, because it requires that another symbol be used for what traditionally was expressed by the equal sign. Comparison for equality became denoted by the two characters “==” (first in C). This is a consequence of the ugly kind, and it gave rise to similar bad ideas using “++”, “--“, “&&” etc.
-
The ugliness of a construct usually appears in combination with other language features. In C, we may write, for example, x+++++y, a riddle rather than an expression, and a challenge for a sophisticated parser! Guess what? Is its value is equal to ++x+++y+1? Or is the following correct? x+++++y+1==++x+++y x+++y++==x+++++y+1 One is tempted to postulate a new algebra! It is indeed absolutely surprising with which eqanimity this notational monster was accepted by the world-
-
-
I found (warning, PDF) this article[^] quite intriguing. The article is a short history of some good ideas and bad ideas in computer hardware, architectures, and programming languages. Some choice quotes:
-
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
-
A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957 and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x. Algol corrected this mistake by the simple solution: Let assignment be denoted by “:=”. Perhaps this may appear as nitpicking to programmers who got used to the equal sign meaning assignment. But mixing up assignment and comparison is a truly bad idea, because it requires that another symbol be used for what traditionally was expressed by the equal sign. Comparison for equality became denoted by the two characters “==” (first in C). This is a consequence of the ugly kind, and it gave rise to similar bad ideas using “++”, “--“, “&&” etc.
-
The ugliness of a construct usually appears in combination with other language features. In C, we may write, for example, x+++++y, a riddle rather than an expression, and a challenge for a sophisticated parser! Guess what? Is its value is equal to ++x+++y+1? Or is the following correct? x+++++y+1==++x+++y x+++y++==x+++++y+1 One is tempted to postulate a new algebra! It is indeed absolutely surprising with which eqanimity this notational monster was accepted by the world-
-
-
I found (warning, PDF) this article[^] quite intriguing. The article is a short history of some good ideas and bad ideas in computer hardware, architectures, and programming languages. Some choice quotes:
-
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
-
A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957 and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x. Algol corrected this mistake by the simple solution: Let assignment be denoted by “:=”. Perhaps this may appear as nitpicking to programmers who got used to the equal sign meaning assignment. But mixing up assignment and comparison is a truly bad idea, because it requires that another symbol be used for what traditionally was expressed by the equal sign. Comparison for equality became denoted by the two characters “==” (first in C). This is a consequence of the ugly kind, and it gave rise to similar bad ideas using “++”, “--“, “&&” etc.
-
The ugliness of a construct usually appears in combination with other language features. In C, we may write, for example, x+++++y, a riddle rather than an expression, and a challenge for a sophisticated parser! Guess what? Is its value is equal to ++x+++y+1? Or is the following correct? x+++++y+1==++x+++y x+++y++==x+++++y+1 One is tempted to postulate a new algebra! It is indeed absolutely surprising with which eqanimity this notational monster was accepted by the world-
Hi, most of this is valid but nothing is really a catastrophe for anyone, because they can mostly be avoided by other constructs. I have to contradict on the equal sign point. I think assignments are done far more often then equality checks. Thus its 100% logical to have one char for an assignment and two signs for the equal operator and not the opposite like suggested. Probably having one sign chars for both of them would have been the best choice - but now its too late :). Robert
-
-
Hi, most of this is valid but nothing is really a catastrophe for anyone, because they can mostly be avoided by other constructs. I have to contradict on the equal sign point. I think assignments are done far more often then equality checks. Thus its 100% logical to have one char for an assignment and two signs for the equal operator and not the opposite like suggested. Probably having one sign chars for both of them would have been the best choice - but now its too late :). Robert
Robert Rohde wrote:
Probably having one sign chars for both of them would have been the best choice
Exactly.
Robert Rohde wrote:
but now its too late
Exactly. :)
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
I found (warning, PDF) this article[^] quite intriguing. The article is a short history of some good ideas and bad ideas in computer hardware, architectures, and programming languages. Some choice quotes:
-
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
-
A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957 and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x. Algol corrected this mistake by the simple solution: Let assignment be denoted by “:=”. Perhaps this may appear as nitpicking to programmers who got used to the equal sign meaning assignment. But mixing up assignment and comparison is a truly bad idea, because it requires that another symbol be used for what traditionally was expressed by the equal sign. Comparison for equality became denoted by the two characters “==” (first in C). This is a consequence of the ugly kind, and it gave rise to similar bad ideas using “++”, “--“, “&&” etc.
-
The ugliness of a construct usually appears in combination with other language features. In C, we may write, for example, x+++++y, a riddle rather than an expression, and a challenge for a sophisticated parser! Guess what? Is its value is equal to ++x+++y+1? Or is the following correct? x+++++y+1==++x+++y x+++y++==x+++++y+1 One is tempted to postulate a new algebra! It is indeed absolutely surprising with which eqanimity this notational monster was accepted by the world-
-
-
I found (warning, PDF) this article[^] quite intriguing. The article is a short history of some good ideas and bad ideas in computer hardware, architectures, and programming languages. Some choice quotes:
-
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
-
A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957 and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x. Algol corrected this mistake by the simple solution: Let assignment be denoted by “:=”. Perhaps this may appear as nitpicking to programmers who got used to the equal sign meaning assignment. But mixing up assignment and comparison is a truly bad idea, because it requires that another symbol be used for what traditionally was expressed by the equal sign. Comparison for equality became denoted by the two characters “==” (first in C). This is a consequence of the ugly kind, and it gave rise to similar bad ideas using “++”, “--“, “&&” etc.
-
The ugliness of a construct usually appears in combination with other language features. In C, we may write, for example, x+++++y, a riddle rather than an expression, and a challenge for a sophisticated parser! Guess what? Is its value is equal to ++x+++y+1? Or is the following correct? x+++++y+1==++x+++y x+++y++==x+++++y+1 One is tempted to postulate a new algebra! It is indeed absolutely surprising with which eqanimity this notational monster was accepted by the world-
Good grief, it seems that Niklaus Wirth rewrites his own history every decade. I don't buy his explanation for "goto" in PASCAL at all, since the reason has constantly shifted. The equal as assignment argument is weird. I don't see it as a bad thing. (And ":=" isn't, in my opinion, an improvment--it's one of the aesthetics of Pascal I've always disliked. It just seems so dorky.)(Funny thing is, I learned Pascal with a version that was very strict and didn't allow "goto" statements.) I actually find many of his arguments of "bad things" or "mistakes" to be strange since many were actually stepping stones in the development of computers and computer languages. In other words, what may seem like a bad idea now was used to move the science forward. (Which, to be fair, he admits at the end of the article.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
-
:-D
"When your own heart asks - how will you respond?" Gosen waka shū "Situation normal - all fu***d up" Illuminatus! My photos on flickr
-
I found (warning, PDF) this article[^] quite intriguing. The article is a short history of some good ideas and bad ideas in computer hardware, architectures, and programming languages. Some choice quotes:
-
The designer of Pascal retained the goto statement (as well as the if statement without closing end symbol). Apparently he lacked the courage to break with convention and made wrong concessions to traditionalists. But that was in 1968. By now, almost everybody has understood the problem, but apparently not the designers of the latest commercial programming languages, such as C#.
-
A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957 and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x. Algol corrected this mistake by the simple solution: Let assignment be denoted by “:=”. Perhaps this may appear as nitpicking to programmers who got used to the equal sign meaning assignment. But mixing up assignment and comparison is a truly bad idea, because it requires that another symbol be used for what traditionally was expressed by the equal sign. Comparison for equality became denoted by the two characters “==” (first in C). This is a consequence of the ugly kind, and it gave rise to similar bad ideas using “++”, “--“, “&&” etc.
-
The ugliness of a construct usually appears in combination with other language features. In C, we may write, for example, x+++++y, a riddle rather than an expression, and a challenge for a sophisticated parser! Guess what? Is its value is equal to ++x+++y+1? Or is the following correct? x+++++y+1==++x+++y x+++y++==x+++++y+1 One is tempted to postulate a new algebra! It is indeed absolutely surprising with which eqanimity this notational monster was accepted by the world-
More condemning of useful programming constructs. The advice against
goto
comes from an age before we had good loop constructs. You shouldn't usegoto
everywhere, but the advice to avoid it completely normally ends up in highly perverted misuse of looping constructs, where a goto would have been clearer. I like this paper (warning, PDF): Gotos Considered Harmful, and Other Programmers' Taboos[^].Stability. What an interesting concept. -- Chris Maunder
-