
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
On 8 August 2015 at 08:03, Daniel Trstenjak
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe