3 ms·
The article and Fowler's Refactoring book had a similar effect on me as well. Your point about statically typed programming languages is one that I've been feel
by famousactress 13y ago
The article and Fowler's Refactoring book had a similar effect on me as well. Your point about statically typed programming languages is one that I've been feeling the brunt of, though I'm not convinced yet.
I've been 100% python for the last few years, after a career mostly in Java and I definitely miss the sweeping refactoring abilities and hard-breaks during those kinds of refactorings. It does lend courage for sure. I'm just SO MUCH MORE productive in python for most of what I do that I'm not willing to throw out the baby with the bathwater yet. Instead I've been trying to focus on leveling up test coverage, and experimenting with Rope for refactorings ( http://rope.sourceforge.net/ http://rope.sourceforge.net/ ). I'm also slowly learning patterns for coding to make refactorings easier moving forward.. choosing code and data structures that are more easily affect-able later, or even things as simple as naming things for grep-ability.
- GyrosOfWar 13y agoModern statically typed languages (cough cough not Java cough) generally have static type inference, which removes a lot of redundancy from the code. Being able to do val object = MyObject(someOtherObject(12, "hello")) // Scala instead of: MyObject object = new MyObject(new someOtherObject(12, "hello")); // Java saves a lot of time and it just looks nicer. All the while retaining the advantages that static, strong typing have (great potential for refactoring, a lot of errors can't happen at all). Of course, there are some things that will still take up more space than they do in Python or Ruby but it's a great improvement. Languages like Rust, Scala or C# also have a good variety of functional programming tools that can make your life a lot easier.
- dllthomas 13y agoInterestingly, this (narrow) case is supported by C++ (auto) now. Even C, kind of: #define AUTO_TYPE(X,Y) __typeof(Y) X = Y ... though I'm not sure I'd recommend it. Type inference in full generality can give you a bunch more, as I just went into over here: https://news.ycombinator.com/item?id=6327327 https://news.ycombinator.com/item?id=6327327
- sebcat 13y agoJava 8 will have static type inference, and some other goodies too.
- moron4hire 13y agoI find C# extremely productive, if you don't try to do like most C# developers seem to want to do and treat it like Java, with interfaces out the ass. An interface can be handy, but generics fill the role more often. However, there are some others like Boo and Nemerle are still statically typed but much, much closer to Python in terms of lack of syntax verbosity.
- famousactress 13y agoI used the very first version of C# and enjoyed the language. I found it an improvement (and obviously a reaction) to Java, for sure.
- marcosdumay 13y agoJust remember that you can hint types in Python, and statically enforce those hints. You can create a type system as powerfull as Haskell's. People just don't do that because it makes them less productive, but it may be a huge bonus for refactoring.