News for hackers. Stuff that matters.
Re:Typing Is Hard by seanmcdirmid on Wednesday February 17, 2021 @03:28AM (#26164041)
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.
Re:Typing Is Hard by eevilspock on Wednesday February 17, 2021 @05:00AM (#26164701)
Nominal types are on Typescript's 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-eee...

Re:Typing Is Hard by jbluepolarbear on Friday February 19, 2021 @12:58AM (#26190215)
This is awesome.
Re:Typing Is Hard by jbluepolarbear on Friday February 19, 2021 @01:13AM (#26190285)
Thanks, 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.
Re:Typing Is Hard by Sharlin on Wednesday February 17, 2021 @03:39AM (#26164123)
Everything old is new again.