4 ms·
I've never used a modern Java IDE (as I've been fortunate enough to never have to program in Java), but still feel confident in the claim that refactoring Haske
by nbouscal 10y ago
I've never used a modern Java IDE (as I've been fortunate enough to never have to program in Java), but still feel confident in the claim that refactoring Haskell is 100 times easier, yes.
- zigzigzag 10y agoThen you probably should, before making such claims. IntelliJ can do refactorings like the following: Extract code into a function, automatically suggested by duplicated code detection. Inline functions back into call sites. Convert imperative for-loops to functional style streams and back again. Change function prototypes globally by adding or removing parameters. Extract classes and interfaces. Common sub-expression elimination (i.e. select an expression, introduce a new variable, all uses of that expression can be replaced as well) Detect dead code and automatically remove it. Refactorings across languages. Replace inheritance with delegation or vice-versa. Automatically generify code. Extraction of type variables. Obviously a whole suite of structural code changes like renamings and other smaller things. That's without getting into all the other code intelligence features. Regardless of how fancy you feel the type system of a language is, these sorts of keyboard-driven refactorings are tremendously helpful for getting code and APIs right.