4 ms·
Type inference is horrible. Mostly because as soon as your project gets large, type inference eats inordinate amounts of time during compiling and indexing and
by mahyarm 10y ago
Type inference is horrible. Mostly because as soon as your project gets large, type inference eats inordinate amounts of time during compiling and indexing and developer experience degrades. Combine that with operator overloading and generics and it gets even worse. Right now I'm suffering through it with swift with a +100k LOC project. The obj-c equivalent compiles and indexes 5-10x faster.
If you can make type inference scale, then I would be all for it. If I'm restricted to a small LoC count, might as well use a dynamic language.
Static typing is a scalable tool. It lets me avoid an entire category of bugs and unit tests. It make refactors easier as I just have to change my thing and then fix all of the obvious compile errors once. It helps me define parts of API contracts in code vs documentation and unit testing. And when a project gets large, the automated nature of static typing helps a lot!
- Roboprog 10y agoOperator overloading is doubly evil :-) FWIW, I mentioned that I think even the built it infix operators are a bad idea, rather than functions, such as variadic add(...), multiply(...), or(...), and(...). (subtract() and divide() really should only have 2 arguments, and not() just one)