[Haskell-cafe] Splitting Hairs Over Terminology

Kirsten Chevalier catamorphism at gmail.com
Mon Feb 26 23:14:11 EST 2007

On 2/26/07, P. R. Stanley <prstanley at ntlworld.com> wrote:
> Back to the comma, surely, syntax sugar fulfills the role of an
> operator, a function, or a sequence of low-level procedures, either
> in part or comprehensively.
> In C, for example, iteration could be implemented using the if
> construct with the dreaded goto command. So, strictly speaking, the
> while loop could be classed as syntax sugar. Yet, the while loop is a
> well-recognized construct in its own right.
> I hope you can see what I'm driving at.

It's useful to see the square-bracket-and-comma list notation in
Haskell as syntactic sugar because you don't need to worry about what
it means; you just need to know how to mentally translate it into
applications of cons and nil, and you already know what those means.
Indeed, Haskell compilers are based on that same principle.


Kirsten Chevalier* chevalier at alum.wellesley.edu *Often in error, never in doubt
"Apathy at the individual level translates into insanity at the mass level."
-- Douglas Hofstadter

More information about the Haskell-Cafe mailing list