News for hackers. Stuff that matters.
Re:Lenses: Composable Getters and Setters for Functional Pro... by lilactown on Monday December 24, 2018 @02:04AM (#18750864)
Everything you said has nothing to do with lenses and everything to do with trying to satisfy some statically-typed aesthetics.

> First, it's possible that different elements of an array or different properties of an object has different shapes

I can't imagine how this would introduce any sort of difficulties w.r.t. lenses that aren't already present with normal getting and setting of nested structures (aka probably not much).

> Second, it's just difficult to get things right without a compiler's help

This has nothing to do with lenses and everything to do with you preferring the feel of static types. You go on to talk about a bunch of issues with complex constructs that really only exist in static typing.

Sometimes you write a wrong thing and get a runtime error. This happens in all dynamically typed languages (and many statically typed as well).

> Furthermore, without types... this rather elegant unification of getter and setter seems to be lost.

Like ya do. I don't see how this has any impact at all on developing applications.

There are no comments on this comment yet.