= vs ->

Paul Hudak paul.hudak@yale.edu
Fri, 12 Oct 2001 08:05:49 -0400


Being one of the old-timers who was deeply involved in this issue, I can
assure you that the decision was not made out of fear that the idea was
patented, since in fact this is the first I've heard of that!  (All we
knew was that the language was trademarked.)  If I remember correctly,
the main reason was to keep "similar ideas together" -- in this case,
pattern matching and guards.  With Miranda's syntax, if the body of the
function were quite large:

   foo [x] = <really-huge-
             multi-line-
             function-body>  if x==1

then the pattern and guard would be greatly separated.  This seemed like
a bad idea to us.

  -Paul


"D. Tweed" wrote:
> On Fri, 12 Oct 2001, Fergus Henderson wrote:
> [Dave Tweed wrote]
> > > sense. I'm not sure why anymore but Haskell changed the `if clause after
> > > the value' to `pattern guard | before =', so I agree it now looks as if
> > > it's stating that the pattern guard is equal to the rhs.
> >
> > I've heard that the company which trademarked "Miranda" also obtained
> > a design patent on using syntax like that in a programming language.
> > The enforcibility of such a design patent is IMHO legally dubious,
> > and the application of design patents to programming languages has
> > never been tested in court as far as I am aware.  But nevertheless
> > the mere existence of such a design patent was probably a significant
> > disincentive to using that syntax.
> 
> Drifting very quickly offtopic, but this amused me... I think it was
> probably me that you heard that from (if it was on a post to the main
> haskell mailing list a couple of years ago.) I was `sure' then that that
> was the case, having been told independently by two people that was the
> reason. However, given that no-one from the Haskell comittee corroborated
> this, and I'd imagine that it isn't something that people would be afraid
> to admit on the Haskell list (unlike a more fanatical place like /.]), I'm
> no longer `sure' that the people infrorming me were correct :-)

-- 
Professor Paul Hudak
Chair, Dept of Computer Science   Office: (203) 432-1235
Yale University                   FAX:    (203) 432-0593
P.O. Box 208285                   email:  paul.hudak@yale.edu
New Haven, CT 06520-8285          WWW:    www.cs.yale.edu/~hudak