[Haskell-cafe] Comments from OCaml Hacker Brian Hurt
Lennart Augustsson
lennart at augustsson.net
Thu Jan 15 11:33:33 EST 2009
Why do people think that you should be able to understand everything
without ever looking things up?
I'll get back to my example from the comment on the blog post. If I
see 'ghee' in a cook book I'll check what it is (if I don't know). It
has a precise meaning and next time I'll know. Inventing a new word
for it serves no purpose, but to confuse people.
Parts of Computer Science seem to love to invent new words for
existing concepts. Again, I think this just confuses people in the
long run. Or use existing words in a different way (like 'functor' in
C++.)
When it comes to 'isInfixOf', I think that is a particularely stupid
name. As you point out, there are existing names for this function.
I would probably have picked something like isSubstringOf instead of
inventing something that is totally non-standard.
I'm not saying Haskell always gets naming right, all I want is to
reuse words that exist instead of inventing new ones. (And 'monoid'
is not category theory, it's very basic (abstract) algebra.) I don't
know any category theory, but if someone tells me that blah is an
endomorphism I'm happy to call it that, knowing that I have a name
that anyone can figure out with just a little effort.
-- Lennart
On Thu, Jan 15, 2009 at 4:15 PM, John Goerzen <jgoerzen at complete.org> wrote:
> Lennart Augustsson wrote:
>> I have replied on his blog, but I'll repeat the gist of it here.
>> Why is there a fear of using existing terminology that is exact?
>> Why do people want to invent new words when there are already existing
>> ones with the exact meaning that you want?
>> If I see Monoid I know what it is, if I didn't know I could just look
>> on Wikipedia.
>> If I see Appendable I can guess what it might be, but exactly what does it mean?
>
> Picture someone that doesn't yet know Haskell.
>
> If I see Appendable I can guess what it might be. If I see "monoid", I
> have no clue whatsoever, because I've never heard of a monoid before.
>
> Using existing terminology isn't helpful if the people using the
> language have never heard of it.
>
> Wikipedia's first sentence about monoids is:
>
> In abstract algebra, a branch of mathematics, a monoid is an algebraic
> structure with a single, associative binary operation and an identity
> element.
>
> Which is *not* intuitive to someone that comes from a background in....
> any other programming language.
>
> A lot of communities have the "not invented here" disease -- they don't
> like to touch things that other people have developed. We seem to have
> the "not named here" disease -- we don't want to give things a sensible
> name for a programming language that is actually useful.
>
> Here's another, less egregious, example: isInfixOf. I would have called
> that function "contains" or something. Plenty of other languages have
> functions that do the same thing, and I can't think of one that names it
> anything like "isInfixOf".
>
> If you're learning Haskell, which communicates the idea more clearly:
>
> * Appendable
>
> or
>
> * Monoid
>
> I can immediately figure out what the first one means. With the second,
> I could refer to the GHC documentation, which does not describe what a
> Monoid does. Or read a wikipedia article about a branch of mathematics
> and try to figure out how it applies to Haskell.
>
> The GHC docs for something called Appendable could very easily state
> that it's a monoid. (And the docs for Monoid ought to spell out what it
> is in simple terms, not by linking to a 14-year-old paper.)
>
> I guess the bottom line question is: who is Haskell for? Category
> theorists, programmers, or both? I'd love it to be for both, but I've
> got to admit that Brian has a point that it is trending to the first in
> some areas.
>
> -- John
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list