4 ms·
Ideally, you'd have a language that allowed you to do both. Generics/type safety when you want them (e.g. for stuff that is hard to maintain), and total freedom
by amelius 6y ago
Ideally, you'd have a language that allowed you to do both. Generics/type safety when you want them (e.g. for stuff that is hard to maintain), and total freedom otherwise.
- pdehaan 6y agoPython with type annotations is the closest I've used to that, and I hate it. It beats no type annotations, but only barely. As soon as I need to use someone else's code, all bets are off. Half the reason I want types is because it makes my life easier when I'm trying to use something written by someone else -- instead I find myself needing to experiment with a debugger to figure out what functions are actually doing.
- int_19h 6y agoC# with liberal use of "dynamic" would be pretty close to that.
- ummonk 6y agoPlenty of languages allow you to do this, either by opting into type checking only when you add type annotations, or by using "any" / "dynamic" or unchecked typecasts as an escape hatch when you don't feel like going through the trouble of how to make the typechecker happy.
- g5becks 6y agoSo basically typescript?