4 ms·
I am not familiar with C#, but what Go does have is gofmt. This forces all Go code to be formatted and styled in a consisten manner. This not only solves reada
by jweir 13y ago
I am not familiar with C#, but what Go does have is gofmt.
This forces all Go code to be formatted and styled in a consisten manner. This not only solves readability issues, but makes all code consistent for machine reading and replacing.
gofmt also supplies a pattern replace method, which is a bit more sophisticated than a regex search and replace.
http://golang.org/cmd/gofmt/ http://golang.org/cmd/gofmt/
- kvb 13y agoRefactoring is not reformatting, nor are text replacement systems comparable. Refactoring allows you to keep program behavior the same while safely making structural changes to your code. Renaming is one simple example of this (where true refactoring tools are superior to textual find-and-replace because they understand which occurrences of an identifier are semantically identical). But there are many other useful refactoring operations, such as extracting a bit of logic into its own method, etc.