4 ms·
The guy didn't even mention type checking. Guess it's not a big deal to him. Zero type errors during runtime is a big deal.
by crimsonalucard 9y ago
The guy didn't even mention type checking. Guess it's not a big deal to him. Zero type errors during runtime is a big deal.
- hawkice 9y agoWell, it's Go, so you're going to have some runtime type errors. interface{} is way too common to avoid them completely (I had the order of arguments for two ConcurrentMaps wrong, for instance, and it blew up on reads -- found it almost instantly, but alas, at runtime). But it should be a much smaller number than python.
- mmirate 9y agoThat's a very good thing for a language to have, indeed. But Go isn't the best thing to look into for productivity-via-the-type-system. What is (barring the purely functional languages' learning curve) is most any ML descendant; albeit Rust in particular if Go-like performance is desirable.
- crimsonalucard 9y agoRust is descended from ml? Isn't Rust a algol based language? Is it functional?
- FreeFull 9y agoOCaml was a really strong influence on Rust. The first Rust compiler was written in OCaml. Rust's traits are also similar to Haskell's typeclasses.
- mmirate 9y agoRust also has discriminated unions, structural pattern matching and local type inference.
- mmirate 9y agoIn addition to typeclasses, Rust has discriminated unions (ergo algebraic datatypes), structural pattern matching, first-class functions, local type inference, and an exclusive/nonexclusive dichotomy of references which serves as a useful proxy for mutability.
- colinmcintosh 9y agoPeople who use Python are generally happy without it IMO. It's not a big deal.
- baq 9y agopeople who use python more aren't as happy about it, otherwise mypy wouldn't exist. i use python more, can't recommend mypy enough, it's great for what it is. it has warts, but that's to be expected if you add an optional strict modern type system to 20 years of dynamic language.
- ageofwant 9y agoA large part of why mypy exists is due to cargo-culting groupthink that leaves the 'static typing > dynamic typing' trope less challenged than it ought to be. Static typing is just not as useful as the glossy claims - and the boilerplate cruft incurs way more friction than typists like to admit. mypy is great, I use it in 'public' api's, tricky parts where context alone is inadequate and where I previously fucked up - the latter usually is a signal that the flow or abstractions can be improved to the extent that I can remove the typing hints. mypy helps me, it does not force me to throw a goat into the lava pit to appease the compiler.
- crimsonalucard 9y agofriction vs 99% reduction of runtime type errors... If the goal is convenience don't go with types. If the goal is robustness, use types.
- sametmax 9y agoWell, python has type check since 3.4 so...
- pleasecalllater 9y agoReally? How does it work?
- sametmax 9y agoGoogle mypy for an introduction. Pycharm has good support for it if you want IDE integration. The stdlib is globally well annoted now. However, most 3rd party libs are not.
- crimsonalucard 9y agomixing untyped libraries with typed basically makes the whole monolith behave as if it was untyped. Once they get the major libraries typed, python projects will become much more robust.
- sametmax 9y agoIt's not an all or nothing proposition. Gradual improvement is a thing.
- crimsonalucard 9y agoagreed. I was just stating something, not a counter at all.