[Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

Max Eronin reductor at gmail.com
Mon Nov 21 15:58:14 EST 2005


On 11/18/05, Sebastian Sylvan <sebastian.sylvan at gmail.com> wrote:
>
> I'm not saying it's impossible to make good use of (.), I'm saying
> that it's not crucial enough to warrant giving it the dot, which in my
> opinion is one of the best symbols (and I'd hand it over to record
> selection any day of the week!).
> I'm also saying that people tend to abuse the (.) operator when they
> start out because they think that "less verbose == better", whereas
> most people, in my experience, tend to stop using (.) for all but the
> simplest cases (such as "filte (not . null)") after a while to promote
> readability. I prefer adding a few lines with named sub-expressions to
> make things clearer.
>

In case someone counts votes pro et contra of replacing (.) operator,
I must say that find it one of the most useful and readable way for
doing many different things (not only higher-order). And very compact
too.
And in my code it is very common operator.
While if somebody, who at this moment counts my vote, will remove
records from the language some day, I very likely wouldn't notice such
a loss.
And I can't say I'm very experienced haskell programmer. Actually I'm
a beginner comparing my experience with other, particularly imperative
OOP languages.
And records with (.) as field selector (coupled with dumb
constructors) will be the last thing i would miss in haskell.


More information about the Haskell-Cafe mailing list