[Haskell-cafe] Re: Allowing hyphens in identifiers
John D. Earle
JohnDEarle at cox.net
Wed Dec 9 18:26:23 EST 2009
The problem that I see with elision resulting in juxtaposition is that it
would alter the layout. Each line would not have the same number of
characters before and after the makeover. Visual appearance would also be
altered. Replacing hyphens with underscores as I originally proposed would
alleviate both of these problems.
There is also the matter of canonicalization for the purposes of comparing
identifiers. Would it be wise for the a version that lacks hyphens be
regarded as equivalent to one that does?
From: "Richard O'Keefe" <ok at cs.otago.ac.nz>
Sent: 09 Wednesday December 2009 1554
To: "Maciej Piechotka" <uzytkownik2 at gmail.com>
Cc: <haskell-cafe at haskell.org>
Subject: Re: [Haskell-cafe] Re: Allowing hyphens in identifiers
> On Dec 9, 2009, at 10:54 PM, Maciej Piechotka wrote:
>> You mean to parse a - b differently then a-b? You don't have the
>> in LISP as AFAIR you use (- a b) but in Haskell it would be a problem.
> It's a problem that COBOL solved a long time ago:
> COMPUTE INCREASED-DEBT = TOTAL-EXPENSES - AFTER-TAX-INCOME.
> Haskell already has this problem with ".", where we generally need
> to put spaces around "." with the meaning "composition" and not
> put spaces around other uses.
> This is something someone could easily try out by writing a trivial
> preprocessor to convert hyphens with letters on each side to
> underscores. See how it works.
> Given the amazinglyUglyAndUnreadably baStudlyCaps namingStyle that
> went into Haskell forNoApparentReasonThatIHaveEverHeardOf, it might
> be nice to have a wee preprocessor that turned
> <lower case letter one> _ <lower case letter two>
> into <lower case letter one> <Upper case letter two>
> so that I could write take_while and Haskell could see takeWhile.
> [I'm writing this in MacOS X Mail. "takeWhile" is underlined in
> red as a spelling mistake, "take_while" is not. Maybe they know
> Here is such a preprocessor. This is meant for people to try out.
> I don't claim that it's perfect, it's just a quick hack.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe