[Haskell-cafe] Language simplicity

Andrew Coppin andrewcoppin at btinternet.com
Tue Jan 12 16:25:34 EST 2010


OK people, it's random statistics time!

Haskell '98 apparently features 25 reserved words. (Not counting 
"forall" and "mdo" and so on, which AFAIK are not in Haskell '98.) So 
how does that compare to other languages?

C: 32
C++: 62
Borland Turbo Pascal: ~50 [without the OOP extensions added later]
Eiffel: 59
VB: The source I checked listed in excess of 120 reserved words, but I'm 
dubious as to how "reserved" they really are. (Is CInt really reserved? 
I doubt it!) It also depends wildly on which of the bazillion VB 
dialects you mean.
Java: 50
JavaScript: 36
Smalltalk: 0
Lisp: AFAIK, there are no truly reserved words in Lisp, only predefined 
functions. (??)
Python: 31
Ruby: 38
Tcl: Same analysis as for Lisp I believe.

As you can see, this conclusively proves... something.

Hmm, I wonder if there's some way to compare the size of the language 
specification documents? :-}

PS. It comes as absolutely no surprise to me that C++ has the most 
keywords. But then, if I were to add AMOS Professional, that had well 
over 800 keywords at the last count...



More information about the Haskell-Cafe mailing list