[Discussion] Inclusion of CasePaths into the language

Is there any movement on this? I’d be thrilled to have this in the language.

6 Likes

I'm just wondering if any of the proposers / backers of this idea are aware of "Optics" from the functional programming community? There's an article here that relates KeyPath to one type of Optic called a "Lens"

I believe Optics would let us generalise the idea of a KeyPath smoothly to "sum types" (enum), and I think also to functors generally (arrays, dictionaries, optionals). But, I've only taken an interest in them and never properly used them or understood them!

It's possible the ideas in Optics might point to a general approach, or might at least give a good overview of the larger territory / problem space.

1 Like

Yes :wink:

3 Likes

I wrote an article about it some years ago :wink:

3 Likes