3 ms·
Actually, Go makes this somewhat easy too. Check this: http://blog.golang.org/2013/01/go-fmt-your-code.html http://blog.golang.org/2013/01/go-fmt-your-code.html
by eknkc 14y ago
Actually, Go makes this somewhat easy too. Check this: http://blog.golang.org/2013/01/go-fmt-your-code.html http://blog.golang.org/2013/01/go-fmt-your-code.html It's possible to do context aware source code substitutions. Works great. (Not that it's something new or groundbreaking though, just relevant to your expectation)
- pjmlp 14y agoComparing gofmt with what refactoring tools allow is too far fetched.
- redbad 14y agoAre you aware of gofmt's rewrite rules? http://golang.org/cmd/gofmt/#hdr-Examples http://golang.org/cmd/gofmt/#hdr-Examples Pretty powerful stuff.
- pjmlp 14y agoI am. Refactoring is much more than that: - create functions and methods from code snippets - merge duplicate code - Semantic renaming of method names/variables/functions without affecting the same name being used in a different context - convert field direct access to wrapper functions/methods - remove dead code - add missing code to interface/module/class where it is being applied - validation of code references in comments - ...