Closed hyouuu closed 5 years ago
It is pretty common to put the equals sign on the next line when defining a new type
.
I definitely know what you mean here, but there are tradoffs with every convention! E.g.
-- possible alternative
type Msg =
MorePlease
| FetchSucceed String
| FetchFail Http.Error
-- alternative that'd need language changes
type Msg =
| MorePlease
| FetchSucceed String
| FetchFail Http.Error
However you do it, it's a bit weird. I think it makes sense to stick with the current way given the options available.
First of all thanks for the Elm lang! I'm following the introduction, but found it annoying that similar patterns in code appear in different format on different topics, which made me feel "This is lousy, should I trust this language?" Taking http://guide.elm-lang.org/architecture/effects/http.html as example:
Here around text and src there is no space, but around onClick and "More Please" there are spaces.
Here the = is on the second line, whereas all other places have = on the first line.
Obviously it's no big issue at all, but as I felt it shows un-polished quality and makes it feel less trust-worthy.
I could also help correct the formats but now sure how GitBook and its permission works...