Hi Adam,

Thank you for an interesting thought; an invisible name might actually be on of 
the better solutions, although you are right in that your suggestion is a bit 
too open for my current project.

Actually, I believe that naming is very important. My goal is to have the 
"average programmer" (i.e. someone without a post-bachelor degree) look at the 
code and get an intuitive feel of what is going on. So in reply to Jerzy, I do 
want to encourage the discussion in the "Noble Domain of Philosophy" and I also 
want to repeat that I am not proposing to change Haskell or Haskell libraries 
(I am working with another language altogether), so don't fear ;)


- Jurriƫn

On 6 Aug 2013, at 10:46, Adam Gundry <adam.gun...@strath.ac.uk> wrote:

> Hi,
> 
> On 06/08/13 06:14, J. Stutterheim wrote:
>> Suppose we now have the opportunity to change the name of the
>> `return` function in Monad, what would be a "better"  name for it?
>> (for some definition of better)
> 
> Rather than proposing a different name, I'm going to challenge the
> premise of your question. Perhaps it would be better if `return` had no
> name at all. Consider the following:
> 
>    return f `ap` s `ap` t
> 
>    f <$> s <*> t
> 
>    do { sv <- s
>       ; tv <- t
>       ; return (f sv tv) }
> 
> These are all different ways of spelling
> 
>    f s t
> 
> plus the necessary applicative or monadic bureaucracy. But why couldn't
> we write just the plain application, and let the type system deal with
> the plumbing of effects?
> 
> I realise that this may be too open a research area for your project...
> 
> 
>> N.B. I am _not_ proposing that we actually change the name of
>> `return`. I do currently have the opportunity to pick names for
>> common functions in a non-Haskell related project, so I was wondering
>> if there perhaps is a better name for `return`.
> 
> I don't think the choice of name matters. I do think it should be short.
> Preferably invisible.
> 
> Adam

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to