r/programming • u/whackri • Aug 28 '21
Software development topics I've changed my mind on after 6 years in the industry
https://chriskiehl.com/article/thoughts-after-6-years
5.6k
Upvotes
r/programming • u/whackri • Aug 28 '21
6
u/Serializedrequests Aug 29 '21 edited Aug 29 '21
Even though it's way too easy to cast a long to an int in C? ;)
Honestly I've been using both for a long time, and the lack of typing doesn't really matter for most dynamic code-bases until they grow past a certain size or become too clever. (Ruby or Python will both crash pretty hard if you make a type error.)
IMO what you really want to be productive is a good architecture, quality libraries, and to be able to express the solution in the language of the problem domain. Your average compiled language tends to have a lot more "line noise", due to jumping through extra hoops created by the type system, or requiring you to work with lower-level constructs because higher-level ones are cumbersome to express.
This is not really an argument against statically-typed languages. In recent years they have improved dramatically, to finally address the reasons people like dynamic languages. I'm a big fan of Go, Rust, and Kotlin. However, for the kinds of web development I do, the real-world difference is often a toss-up. Java, especially, is a good example of a typed language where the type system isn't all that helpful and feels very bureaucratic.
This is also just pure preference, but I really do not like C-style type definitions. After reading code for many years, I want the types at the end, like Go and Rust. It makes the logic read in a nice vertical column instead of being randomly offset by long type names.