[erlang-questions] Why is Erlang what it is?
Fri Dec 15 10:39:54 CET 2006
This discussion about static typing and such reminded me of something
amusing I read on comp.compilers on the (de)merits of declaring variables.
Tongue in cheek as stated, but some cute thoughts anyway.
Quinn Tyler Jackson wrote in comp.compilers "RE: Non-declared Variables" around 26 Oct 2006:
> I think languages should forbid the declaration of variables, for the
> following reasons:
> Required declaration of variables...
> * ... leads to the programmer jumping to conclusions about what a variable is for.
> * Code doesn't need no declaration telling a compiler what it can and cannot do.
> * ... puts the responsibility for correctness on the human beings, and human beings are fallible.
> * Type mismatch errors during compilation inhibit creativity.
> * ... because it's redundant to introduce syntactic sugar into a language when there is already a mechanism in place to state intended use of a variable: comments.
> * ... puts undo weight on variables, bringing them to others' attention and de-emphasizing the algorithm.
> * ... de-emphasizes the Wikipedian notion of "eventualism" ("the program will eventually be correct if it's important enough to make it so, and a mass of coders will make it correct one day if it's notable") and emphasizes "immediatism" ("the program must work correctly NOW or it is useless.")
> * ... increases inter-line dependencies: variables declared on line n first used on line n+j, for some increasing value of j over time as code gets tweaked.
> * ... requires compiler technologies to remember too much information they could use probabilistic methods to guess at.
> * ... gives a false sense of correctness: all code is wrong somewhere, so why dress it up and present it as being "more correct" -- correctness is an absolute, not a scale.
> * ... is disempowering: who's to say that variable's right to self determination should be usurped by some declaration? Let it decide its own eventual fate.
> * ... is too prematurely legalistic: when a coder declares what a variable "is" -- he or she is presuming to know what the meaning of "is" is.
> * ... puts too much responsibility on other code for being correct, causing resentment between lines.
> * ... is stifling to system evolution: if someone comes along later and wants to change a variable's type, he or she must then do an impact study to see what might break. Since evolving systems are broken anyway, this deters progress by overemphasizing and dictating that those breaks be in the more important parts: the system logic, rather than the less important parts: the administratrivia.
"Weg damit" is german for "get rid of this".
More information about the erlang-questions