3 ms·
> I think the thing is, if you want to write at a Clojure-level-abstraction, Haskell won’t stop you doing that Unless Haskell drastically fixed its record synt
by yen223 8y ago
> I think the thing is, if you want to write at a Clojure-level-abstraction, Haskell won’t stop you doing that
Unless Haskell drastically fixed its record syntax recently, this is definitely not the case.
- moomin 8y agoYeah, Clojure’s “labels are values” map stuff is pretty nice.
- Peaker 8y agoHaskell record syntax with lenses is workable: import Control.Lens data MyRecord = MyRecord { _a :: Int, _b :: MyRecord } makeLenses ''MyRecord Then you can use it nested like: over (b . b . a) (+5) myRecord
- tome 8y agoClojure people use the untyped equivalent of row types, i.e. being able to arbitrarily add and remove fields to and from a record. That would be nice to have in Haskell (though personally it's nowhere near a dealbreaker for me).
- Peaker 8y agoHaskell has reasonable implementations of row types as well.