[Haskell] Beyond ASCII only editors for Haskell
Johannes Waldmann
waldmann at imn.htwk-leipzig.de
Mon May 23 03:18:51 EDT 2005
>>>to only ASCII characters. For example, I would not write 'sqrt 2' but I
>>>would write a square root symbol with 2 underneath. Likewise, I would
>>>not write '2 ^ 5', but I would write a 2 with a 5 raised upwards to the
>>>right of the 2. ...
Remember Paul Halmos' advice (from "I Want To Be A Mathematician"):
if you use (or dare to invent) "tricky" notation,
imagine you had to read the formula to someone over the phone.
Then you need to *name* and *pronounce* things, not just *write* them.
This also enforces a natural linear order on the representation,
much like the sequence of characters in a file.
On the other hand, most editors will represent it two-dimensionally,
but it's not clear whether hard-wiring 2D into a language definition
solves more problems than it creates. (So the Haskell designers were
cautious and allowed to bypass the layout convention.)
With a few examples (sin, cos, log, ...),
Mathematics has gone a long way to avoid multi-letter identifiers.
Since there are only a few latin letters, it resorts to graphical
(examples above) and calli-graphical resolutions
(other fonts, boldface, italics, superscripts, subscripts etc. I think
the \sqrt sign is in fact an "r" = first letter of "radix" = root)
From an "engineering" standpoint (readability, maintenance),
this sometimes is questionable. See any software engineering textbook,
section "choose sensible names for identifiers". By sticking to
plain ASCII, we enforce longer (and hopefully more meaningful) names :-)
BTW, the Haskell standard itself does feature some unnecessary
cleverness: abridged names like Bool, fst, snd just don't feel right.
--
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
More information about the Haskell
mailing list