3 ms·
I'd argue the syntax is the worst part of haskell. In particular, the lack of object notation for accessing fields (e.g. car.doors) is particularly frustrating.
by joelthelion 2y ago
I'd argue the syntax is the worst part of haskell. In particular, the lack of object notation for accessing fields (e.g. car.doors) is particularly frustrating.
I still love the language, BTW.
- gtf21 2y agoYou can have that syntax if you want it via `OverloadedRecordDot`. I actually really like the syntax as it makes it easy to write DSLs which are actually just Haskell functions.
- rebeccaskinner 2y agoThere is an extension that lets you do this now (OverloadedRecordDotSyntax) but truthfully I think it’s a really bad idea. The (.) operator already has a very concrete meaning in Haskell, and record dot notation means that you suddenly need to care about the specific details of how values are calculated. Field accessor functions are much better imo even if they seem a little odd.