[Haskell-cafe] an idea for modifiyng data/newtype syntax: use `::=` instead of `=`

Vlatko Basic vlatko.basic at gmail.com
Sun Aug 9 08:44:56 UTC 2015


I saw this as an entertaining "If I could wish..." survey, and don't think 
anybody is thinking seriously to implement it. If you asked me a few years ago, 
I'd say yes, go ahead. The benefit/cost rate is far too small, if any.

As for the 'beginner-friendly' reason for change, while learning Haskell, it 
took me half an hour of confusion, and another half an hour of anger of how 
'stupid' Haskell is. :-)

But it is interesting to see how many people responded to this. Obviously a 
touchy thing.



> -------- Original Message --------
> Subject: Re: [Haskell-cafe] an idea for modifiyng data/newtype syntax: use 
> `::=` instead of `=`
> From: Oliver Charles <ollie at ocharles.org.uk>
> To: Geraldus <heraldhoi at gmail.com>, Hilco Wijbenga <hilco.wijbenga at gmail.com>, 
> Haskell Cafe <haskell-cafe at haskell.org>
> Date: 08/08/15 21:14
>
>
> I hate to come across as a party-pooper, but do we really think it's realistic 
> that any of these changes will be made? I understand that there may be 
> benefits, but they don't outweigh the cost of breaking almost all existing 
> code. The idea of opting in to this with pragmas just doesn't seem worth it, 
> and further fragments the language, ultimately reducing readability when I 
> pick up another author's code.
>
> /ocharles/
>
> On Sat, Aug 8, 2015 at 7:29 PM Geraldus <heraldhoi at gmail.com 
> <mailto:heraldhoi at gmail.com>> wrote:
>
>     type -> alias
>     data -> data
>     newtype -> newalias or newdata?
>
>     `type` keyword was really confusing for me at the beginning, also this
>     confusion brought another one about `newtype` keyword.
>
>     сб, 8 авг. 2015 г. в 22:28, Hilco Wijbenga <hilco.wijbenga at gmail.com
>     <mailto:hilco.wijbenga at gmail.com>>:
>
>         On 8 August 2015 at 08:03, Daniel Trstenjak
>         <daniel.trstenjak at gmail.com <mailto:daniel.trstenjak at gmail.com>> wrote:
>         >> type Name = String
>         >> data Date = Date Int Int Int
>         >
>         > if we're at it ;), then please change it to:
>         >
>         >    alias Name = String
>         >    type Date = Date Int Int Int
>
>         I wholeheartedly agree with replacing the current "type" with "alias",
>         the current "type" is just flat out wrong: it does *not* create a
>         type. This should be very simple to do too: introduce "alias" as a new
>         keyword and deprecate "type". No existing code would be affected.
>
>         I'm on the fence about "type" instead of "data", though. "data"
>         clearly conveys the meaning that we are talking about data only, not
>         functions on that data (as in OOP). (Well, data constructors are
>         functions too.) Then again, as soon as you add "deriving", you *are*
>         defining functions on that data.
>         _______________________________________________
>         Haskell-Cafe mailing list
>         Haskell-Cafe at haskell.org <mailto:Haskell-Cafe at haskell.org>
>         http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>     _______________________________________________
>     Haskell-Cafe mailing list
>     Haskell-Cafe at haskell.org <mailto:Haskell-Cafe at haskell.org>
>     http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150809/39d7db79/attachment.html>


More information about the Haskell-Cafe mailing list