@noelrap
especially nowadays where strings are frozen by default, the distinction doesn't seem to matter much anymore.

Having a good type system means we can start using union literal types without having to define concrete enum classes, and so symbols might start to have a meaning again. We can elevate a parameter from something that might take a symbol to something that takes a value from a narrowly defined meaningful set.

I'm thinking about one of the talks that got me excited about typing, by Scott Wlaschin, "Domain Modelling Made Functional" (I think this one: youtube.com/watch?v=2JB1_e5wZm). He comes from a DDD perspective and starts modelling all the business concepts as types before even writing any logic. That really appeals to me and comes back to my point about having union types start to represent meaningful domain concepts rather than a parameter being "some sort of symbol or string idk good luck"

Anyway I'm rambling now.

0
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies