4 ms·
For sure. I just think that sort of string API is a great example of something we've historically had to trade off for type-safety. There are of course nice qu
by hombre_fatal 6y ago
For sure. I just think that sort of string API is a great example of something we've historically had to trade off for type-safety.
There are of course nice qualities of simple functional composition and custom operators, though it comes with another layer of overhead that you wouldn't necessarily always choose over a simpler API in every case. Richer typed expressiveness lets us pick the right trade-off without being forced.
- lmm 6y agoMy point is that it's something a lot of statically-typed languages have been able to do for a while - the classic lens paper/talk is about 10 years old at this point, and the literal-type support that you'd need to convert a string to a typesafe lens has been around for a pretty similar length of time at least in some places.