[Haskell-cafe] Re: Allowing hyphens in identifiers

minh thu noteed at gmail.com
Fri Dec 11 05:41:48 EST 2009

2009/12/11 Johannes Laire <johannes.laire at gmail.com>:
> On Thu, Dec 10, 2009 at 12:54 AM, Richard O'Keefe <ok at cs.otago.ac.nz> wrote:
>> Given the amazinglyUglyAndUnreadably baStudlyCaps namingStyle that
>> went into Haskell forNoApparentReasonThatIHaveEverHeardOf
> Compare:
> someCoolFunc fstParam sndParam fooBarBazQuux
> some_cool_func fst_param snd_param foo_bar_baz_quux

Before even reading your paragraph below, I thought the second one was
easier to read :)

> In the first one, it's easy to see that there are 4 identifiers. But,
> at least for me, the second one is significantly harder to read;
> spaces and underscored are too similar. So, while underscores more
> clearly separate words in a single *identifier* and make it easier to
> read, in some cases I think they make *code* with many identifiers
> harder to read for exactly the same reason.
> In languages where function application looks like "f(x,y,z)" instead
> of "f x y z" this isn't a problem and I often use underscores.

Your example should be seen with a monospaced font to be fair thought,
as programming is usually done with such a font. (But both lines are
easier with a monospaced font.)


More information about the Haskell-Cafe mailing list