Hacker News new | past | comments | ask | show | jobs | submit login

I meant what if you wanted to add a new item to the front of a list or change the order of items in the list.

    [ 1
    , 2
    , 3
    ]
to

    [ 0
    , 1
    , 2
    , 3
    ]
diff

    - [ 1
    + [ 0
    + , 1
      , 2
      , 3
      ]
> Other than that, bashing a language for having the convention (that is not forced by the language but by... convention) is quite ridiculous.

It is forced slightly by the language as trailing commas are currently invalid syntax (though this is on the roadmap to be fixed). It's also more than just a convention, as it is explicitly recommended in the official Elm docs.




Nobody has mentioned it, but in this sort of language, you're chaining expressions onto the right-hand side.

Putting commas on the left-hand side means they're out of your way once and for all.

The versioning diff argument is much less interesting. Most people don't care about that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: