4 ms·
You are not missing anything. I think people are going crazy for strict static typing because they want to feel like they're on the front edge of progress. But
by TheRealDunkirk 3y ago
You are not missing anything. I think people are going crazy for strict static typing because they want to feel like they're on the front edge of progress. But I don't think it's _better_; I think it's just _different_. I got bogged down in with Java and Angular awhile back. The amount of boilerplate required to keep the front end and back end compilers in sync was treacherous. Also, I had to make exceptions for corner cases that wouldn't match up. So it was no benefit to me. Maybe if your application is large enough that it involves big teams on each side, you would need static typing to keep everyone straight. And I think this is a large part of the back-and-forth on this forum. We discuss things that vary based on problem context without realizing (or admitting) that the implementation is situational.
- jvanderbot 3y agoI disagree that you aren't missing "anything", there's no such thing as a free lunch. But I agree that _some_ of the uptick is because people are excited about being a "safe" and "rigorous" developer, but they get a nice package manager with Cargo that feels a lot like pip or npm. I get a question over and over from front end devs when I teach or mentor about being a "real" computer scientist and picking up c, Cpp, or rust, which is silly. Who do you think invented the dynamically typed languages, English majors?
- shrimp_emoji 3y ago>there's no such thing as a free lunch Yeah. The bill was paid when the language devs bothered to write a compiler, so that your runtime bugs become compiletime bugs and so you can understand what's happening when your program is bigger than a tiny script.
- wiz21c 3y agoI code alone and need performance for my project. I had choice beween C++ which I know a bit of; Go or Rust which I had to learn. Considering that I screw my mallocs and threads in C++ more often than not, I decided to check Rust. I am not disappointed: the safety helps a lot in getting my codebase free of many bugs (rust won't let me be lazy, I have to solve many bugs upfront). Sure the BC is madenning at times, but the support of the compiler allows me to not think too much about what I do and spend time on my business. Now, on my old PC, the compiler is super slow so I end up prototyping tricky stuff (like maths) in python and then I port it to rust when I feel it's ready. (my stuff is emulator: no DB, not much GUI but lots of performance, threading, etc.)
- jvanderbot 3y agoNot to be too snarky, but malloc really seems out of place in modern c++.
- wiz21c 3y agoyeah, I admit it's been a long time :-)
- TexanFeller 3y agoJava's type system is anemic compared to modern languages, please don't use it as the point of comparison in typed vs untyped debates.
- kaba0 3y agoIf we for some weird reason were to put go as a modern language, than Java is some Haskell :D But jokes aside, Java’s type system can’t express HKTs, but up to that point it really is surprisingly strong — there is vavr, but I have also personally followed my former “define Haskell basic data types yourself in Haskell” class quite far in it, including Lists, Eq trait, Maybe type, etc.