3 ms·
What you use the word “type” for is a nominal type and your shapes are structural types. The utility and different trade offs between nominal and structural typ
by seanmcdirmid 6y ago
What you use the word “type” for is a nominal type and your shapes are structural types. The utility and different trade offs between nominal and structural types were explored a lot back in the 90s.
- Sharlin 6y agoEverything old is new again.
- eevilspock 6y agoNominal types are on Typescript's roadmap: https://github.com/Microsoft/TypeScript/wiki/Roadmap https://github.com/Microsoft/TypeScript/wiki/Roadmap Side note: An Introduction to Nominal TypeScript: What are nominal types and why should I use them? : https://medium.com/better-programming/nominal-typescript-eee36e9432d2 https://medium.com/better-programming/nominal-typescript-eee...
- jbluepolarbear 6y agoThis is awesome.
- jbluepolarbear 6y agoThanks, I don’t think I learned the about these concepts in college; granted, I dropped out because I am ADHD to the max. I usually adopt or adapt what I observe in others code, my old code, or idea from other fields entirely. I like to adapt and improve techniques I see and fit them best into my projects.