(no title)
strawhatguy | 9 days ago
Like how clojure basically uses maps everywhere and the whole standard library allows you to manipulate them in various ways.
The main problem with the many type approach is several same it worse similar types, all incompatible.
fiddlerwoaroof|9 days ago
The way I've thought about it, though, is that it's possible to design a program well either by encoding your important invariants in your types or in your functions (especially simple functions). In dynamically typed languages like Clojure, my experience is that there's a set of design practices that have a lot of the same effects as "Parse, Don't Validate" without statically enforced types. And, ultimately, it's a question of mindset which style you prefer.
strawhatguy|9 days ago
The real world often changes though, and more often than not the code has to adapt, regardless of how elegant are systems are designed.
eddd-ddde|5 days ago
packetlost|9 days ago
doublesocket|9 days ago
Rygian|9 days ago
unknown|9 days ago
[deleted]
Kinrany|8 days ago
Start with a more dynamic type, do stuff that doesn't care about the shape, parse into a more precise type, do stuff that relies on the additional invariants, drop back into the more dynamic type again.
slopinthebag|8 days ago
marcosdumay|9 days ago