4 ms·
Has there been a statically typed language with no null and no generics? I'm pretty sure that every language I've used that implements an Option-like type has i
by steveklabnik 7y ago
Has there been a statically typed language with no null and no generics? I'm pretty sure that every language I've used that implements an Option-like type has it be generic. Maybe TypeScript, where you can have "number | null"?
- Crinus 7y agoQBasic :-P. Though all dynamic allocation happens by resizing predefined arrays.
- kristoff_it 7y agoGo is already getting away with a magic generic map type, they could have done it the same way, it they wanted to.
- ummonk 7y agoGo has generics (e.g. in its data structures). They just aren’t usable by the programmer. The same could have been done for optionals.