Hot take frinklang.org is one of the most interesting demonstrations of "real world" dynamic types as something beyond just "not static types". I don't see how its unit affordances would be feasible without runtime type manipulation.
Conversation
One example: if you define a new unit "duck", Frink immediately understands what a "kiloduck" is. It knows how the kilo- prefix works with any unit.
7
1
12
Curious to know why this is dynamic vs. static type thing. It's certainly seems to be either an argument against extensible type systems, or an argument for domain-specific static type systems, or for a blending between the static and dynamic (I like the last one).
1
I've found this big survey of stuff related to units of measure handy in the past: gmpreussner.com/research/dimen - covers a huge range of stuff from the static to the dynamic. You may have seen it before though.
That list is really cool because it defines the relevant concepts under standard nomenclature - in this case 'prefix names' and 'prefix symbols', and summarises how each system implements them.
1
1
Anyway, not sure if that helps at all, looking forward to read what you write about Frink! 🙂
The main weakness of that survey is that it doesn't distinguish between languages that can manipulate and query units at runtime (e.g. Frink) and those which have all units erased at compile time (e.g. F#).
1
2
Being able to manipulate/check/query units of measure at runtime is critical any time you handle input from users or files.
2
3
Show replies


