Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`fst` and `snd` possess a symmetry which `first` / `second` lack

Personally I've got used to them like in no time



Why is symmetry in word length needed?


Why is anything "needed"? It's all a continuum of convenience, readability, familiarity, prior art, and preference.

That you fall somewhere differently on any or all of those spectrums than the author is fine.


Alignment.

    x = fst(some complex expression)
    y = snd(some complex expression)


The need for such alignment denotes a further deficiency in the language if it lacks pattern matching.

    (x, y) = some complex expression
And I’m not for sure if this alignment overrides the readability aspect. Verify few languages have alignment in mind, and even less formatters do, so it isn’t clear why alignment is so strongly needed in this very particular case. And what about third and fourth?


some people click on this.


I still hate them after 5 years of professional PureScript.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: