| ▲ | troad 2 hours ago | |
String literal typing appears to be a common feature of type systems bolted onto dynamic languages:
I assume it exists to compensate for the previous lack of typing, and consequent likelihood of ersatz typing via strings.It would seem pretty unnecessary in Haskell, where you can just define whatever types you want without involving strings at all:
Of course you'd need a trivial parser, though this is probably a good idea for any string type:
Interestingly, dynamic languages which make use of symbols (Ruby, Elixir, Common Lisp) probably fall closer to Haskell than Python or TS. Elixir example:
Where :yes and :no are memory-efficient symbols, not strings. | ||