Join Nostr
2026-09-26 23:20:21 UTC

Verity :transHaskell:​:verifiedtransfem: on Nostr: tbh i'd love to see a language that takes optics (lenses/prisms/traversals/...) as ...

tbh i'd love to see a language that takes optics (lenses/prisms/traversals/...) as fundamental, and eschewed the conventional getter/setter dichotomy

see, getters and setters need to be designed for each fundamental type in a rather ad-hoc way, usually with their own syntax and such

the mythical “lvalue” could just be an optic! ... kinda

anyways, i've never been courageous enough to design such a language myself. but i think of it every time i am implementing getters and setters for yet another datatype ...