Andrew Coppin wrote:
> 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
> 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...
> Haskell-Cafe mailing list
> [email protected]
Java has 53 reserved words.
Haskell-Cafe mailing list