(Difference between revisions)
m (Wadlers Law moved to Wadler's Law)
Revision as of 17:33, 16 April 2012
Wadler's Law states that:
In any language design, the total time spent discussing a feature is proportional to two raised to the power of its position. 0. Semantics 1. Syntax 2. Lexical syntax 3. Lexical syntax of comments
The origins of this law are found in two emails:
1 Haskell mailing list, 1992
Date: Wed, 5 Feb 1992 09:14:00 +0000 From: Philip Wadler <email@example.com> Sender: firstname.lastname@example.org To: email@example.com Cc: firstname.lastname@example.org, email@example.com, firstname.lastname@example.org Subject: Literate comments
Despite Paul having ruled on the matter, the debate still rages, with about half saying that > is wonderful, and half saying it is awful.
Under these circumstances, Paul's ruling seems right: it is pointless to legislate > as part of the language.
On the other hand, the current circumstance is that the main implementations do all use the > convention. It seems reasonable to say this in the report -- we should at least tell other implementors what the current implementors have settled upon. This would also let Joe use the convention in presenting the standard prelude, as he says he would like to do.
To be precise: I propose an additional chapter of the report, labeled `Literate comments' and no more than one page long, that states a convention for providing literate comments, notes that it is NOT part of Haskell but is supported by existing implementations, and mentions that the Prelude is presented with this convention in the report. I volunteer to draft the page.
Paul, as syntax honcho you should rule on this. Cheers, -- P
PS: Wadler's Law: The emotional intensity of debate on a language feature increases as one moves down the following scale: Semantics, Syntax, Lexical syntax, Comments.
2 Revised law, Thu, 19 Dec 1996
From: Philip Wadler <wadler_at_research.bell-labs.com> Date: Thu, 19 Dec 1996 10:52:48 -0500
> > Good point, and well worth stressing. Nonetheless, it still seems > > quite reasonable to say that Curry should contain all Haskell > > that eschew type classes and non-uniform pattern matching. > > I think this is a good remark and I can agree to it.
I'm delighted to hear this.
> Concerning uppercase/lowercase: of course, we can or should > use Haskell's *convention*, but I do not like to enforce it, ...
Oh dear. I don't think we've gotten our point across.
Yes, there are problems with enforcing a capitalisation convention. There are also problems with not enforcing one. Nothing unique to Curry here. The Haskell committee spent a lot of time hashing over this ground. I strongly urge you to leave this can of worms shut. Adopt the Haskell solution wherever possible, warts and all!
You might be interested in the following scientific law, which has been verified by extensive emperical observation.
WADLER'S LAW OF LANGUAGE DESIGN
In any language design, the total time spent discussing a feature in this list is proportional to two raised to the power of its position.
0. Semantics 1. Syntax 2. Lexical syntax 3. Lexical syntax of comments
(That is, twice as much time is spent discussing syntax than semantics, twice as much time is spent discussing lexical syntax than syntax, and twice as much time is spent discussing syntax of comments than lexical syntax.)
With the exception of comments, I would say discussion so far conforms to this observation. -- P