Hacker News new | ask | show | jobs
by phtrivier 2290 days ago
Can someone with actual real-life in-production-for-a-while in-an-actual-company-with-annoying-customers-who-change-mind-all-the-times tell me about the refactoring story in Smalltalk ?

Sure, I know the IDE can change the signature of a function, and stuff like that, but is it enough to actually do broad refactorings with any level of confidence ("broad" meaning "the kind where you realize the next feature requests invalidate most of your previous design, as happens pretty much every time you get a new feature request ?")

Or are you still at the mercy of a whatever the Smalltalk version of a runtime error is, whenever you have - god forbid - made a typo somwhere ?

I'm deeply hating a certain "pretty fashionable" dynamic langage (that will charitably remain unnamed) for this kind of reason, and I'm not going to buy the "Supreme productivity" claim anymore from any language that requires me to double check every function call just in case I mispelled a word.

1 comments

On this note, I still haven't found a language that does broad refactoring as well as C# (with resharper) does.

From method extraction, to module, namespace, function renaming, to adding parameters to functions, it just takes care of it.

My suspicion is that Java does it as well (but I don't have experience with it), but every other language I've tried lags far behind it.

It's been really frustrating to be really getting into something then tripped up because it doesn't understand that when you're renaming Foo to Bar you also want foo.ext to become bar.ext. Or when you want to make foo(a,b,c) become foo(b,c) that it's the first parameter that needs removing (automatically) from all calls. Or even when transforming foo(a,b,c) to bar(b,c,d) that it can fix the calls with combined re-move and add parameter instructions.

Some languages are starting to catch up, but I've seen nothing that has come close to the productivity that C# has delivered specifically with respect to refactoring.

Can anyone recommend other language / IDE combinations that can deliver that kind of productivity?

(And I don't want to get into a discussion about whether that's misplaced productivity because it's better to write in a way that doesn't need re-writing and re-naming things all the time, because you might be right but it's one of those times that being right doesn't change the reality of the work environment.)

Just to add on sibling's comment.

IntelliJ IDEA is the original tool from the resharper guys (jetbrains). You will find pretty much every feature of resharper natively on IDEA with java/kotlin. Those were ported into resharper.

Jetbrains usually have very good IDEs, I've not used them all, mostly just IntelliJ which looks like the one they prioritize onto, so I recommend you to take a look if you liked the resharper experience.

Also, they have their own C# IDE: Rider, that should have all resharper niceties.

Java and intellij does all that.
IntelliJ (the platform, with other names for each language) can actually do this with many languages:

* Java * Kotlin * Groovy * Dart * Go * Elm

These are the ones I've tried myself and can attest to. There are probably others (maybe Rust - but last I tried it, it was still lagging far behind, though Jetbrains seems to be investing heavily on it).