News for hackers. Stuff that matters.
Re:Things You Should Never Do, Part I (2000) by famousactress on Wednesday September 04, 2013 @11:09AM (#6328054)
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/ ). 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.

Re:Things You Should Never Do, Part I (2000) by GyrosOfWar on Wednesday September 04, 2013 @11:32AM (#6328247)
Modern 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.

Re:Things You Should Never Do, Part I (2000) by dllthomas on Wednesday September 04, 2013 @11:46AM (#6328350)
Interestingly, 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

Re:Things You Should Never Do, Part I (2000) by sebcat on Wednesday September 04, 2013 @12:15PM (#6328556)
Java 8 will have static type inference, and some other goodies too.
Re:Things You Should Never Do, Part I (2000) by moron4hire on Wednesday September 04, 2013 @02:55PM (#6329615)
I 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.
Re:Things You Should Never Do, Part I (2000) by famousactress on Wednesday September 04, 2013 @05:51PM (#6330763)
I used the very first version of C# and enjoyed the language. I found it an improvement (and obviously a reaction) to Java, for sure.
Re:Things You Should Never Do, Part I (2000) by marcosdumay on Wednesday September 04, 2013 @04:29PM (#6330258)
Just 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.