3 ms·
I'd actually point the finger at Java itself, though I imagine the editor didn't help. Java's type system is (IMO) about as cumbersome and unhelpful as they com
by millimeterman 6y ago
I'd actually point the finger at Java itself, though I imagine the editor didn't help. Java's type system is (IMO) about as cumbersome and unhelpful as they come. A good type system should be minimally obtrusive while preventing lots of programming errors (both when writing code and, perhaps more importantly, during maintenance by a different person a year down the line).
For languages with good type systems, I'd recommend something like OCaml (or maybe F# - I know it's very similar and probably has a better ecosystem but I haven't personally used it).
Elm also seems decent - it's designed to be pretty simple and has JS interop but it doesn't have good tooling. Typescript is an alternative that has an okay type system but pretty quality tooling.
I'd recommend staying away from Haskell even though it's commonly recommended. The type system is quite complex and its use of monadic I/O makes writing "real" programs, even toy ones, difficult for many people. If you want to learn Haskell, I'd say start with OCaml/F#/Elm. Those are all very similar and will let you learn the fundamentals of ML-style programming before diving into Haskell-specific details.
- _bxg1 6y agoI would also add that type inference is one of the biggest differentiators when it comes to developer experience. When you have to manually type every single thing, even local variables, it's easy for the system to hinder more than it helps. Whereas in TypeScript you're free to omit return types whenever you want them to be driven by the internal code, or specify them when you want to establish a stronger contract. The same goes for local variables. You can even call generic functions without parameterizing the generic type if it can be inferred from the arguments.