[Haskell-cafe] Line noise
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Wed Sep 24 00:46:25 EDT 2008
On 2008 Sep 21, at 15:10, Andrew Coppin wrote:
> Philippa Cowderoy wrote:
>> On Sun, 21 Sep 2008, Andrew Coppin wrote:
>>> - Several standard library functions have names which clash badly
>>> with the
>>> usual meanings of those names - e.g., "break", "return", "id".
>>
>> For this one, I'm inclined to say "welcome to a new paradigm".
>> Though having to tell my dad briefly that do isn't a loop construct
>> was odd for a moment.
>
> I think "return" is a rather bad choice of name. But on the other
> hand, I can't think of a better one. And let's face it, anything has
> to be better than (>>=). (Most cryptic name ever?)
Applicative and Arrow have the replacement for "return" right: "pure".
No argumnt about (>>=), but on the other hand I remember (>>=) but
never remember the arrow or Applicative operators.
> Idiomatic Haskell seems to consist *only* of single-letter variable
> names. When did you last see a pattern like (customer:customers)?
> No, it'd be (c:cs), which isn't very self-
I tend to use something like cust:custs; I prefer to be able to read
it. If the code is generic then I'll use generic names --- which
alerts me to its genericness.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list