4 ms·
If you look at the actual fixes gofix provides, most of them are to paper over a lack of language features. In particular, if Go supported function overloading,
by munificent 16y ago
If you look at the actual fixes gofix provides, most of them are to paper over a lack of language features. In particular, if Go supported function overloading, they probably wouldn't need gofix at all.
- uriel 16y agoSome people consider the lack of function overloading a feature. And languages that have function overloading have plenty of API changes that could benefit from something like gofix.
- supersillyus 16y agoI disagree. Even for the gofix fixes look to be simple "n args to n-1 args" changes, even in a language that supports function overloading I would prefer to have one version of the function, not two. The use of overloading to avoid the pain of an API change over time leads to a pretty crappy interface.
- jff 16y ago"If they just had function overloading, we could keep dozens of old, unmaintained functions around forever! Think how amazing documentation will be!"
- pjscott 16y agoAs it is, their core libraries are remarkably clean and well-designed. The source code is even a pleasure to read.
- munificent 16y agoIt's pretty to make version one of your language's libraries clean and simple. The real challenge is how they hold up over time and the needs of evolution. Go's philosophy seems to be: 1. Simplicity matters more than compatibility. 2. Assume all extant Go code is easily mutable. The purist in me finds that appealing, but I'm not sure how that will hold up over the long term. The language seems intentionally designed to not evolve which doesn't seem like a good way to stay useful for real people for a long time. Maybe I'm wrong and everything will work out, but I wonder if several years from now, Go will just fall over from its inflexibility and become unusable.
- uriel 16y ago> The language seems intentionally designed to not evolve This is a strange claim to make given how much the language (and its libraries) have actually evolved during their little more than a year of life.
- jff 16y agoYou typically can't even compile Linux with the previous GCC version, yet somehow that kernel has been tottering along for about 20 years now. If you compile a program using Go, you get a binary that will run forever. Statically linked, contains the runtime, you're all set. If you update Go, you can then re-build that same program, but you might have to update a few things to get a working binary again--but you only have to do this if, somehow, that originally-compiled binary isn't working for you. If Python decides they want to change the syntax for opening a file, then you can either 1. Keep a second Python around forever for compatibility or 2. Modify your program so it uses the new syntax. Go will never do this to you; as long as your OS continues to support the same binary format, I don't see why a binary shouldn't work indefinitely.
- timclark 16y agoReading the source code is also an excellent way to learn Go!
- singular 16y agoAm with the siblings - disagree very much. A very nice thing about go is that it isn't afraid to say 'no' to features, nor is it afraid to enforce conventions to encourage consistency. I bet the coding standard discipline at google has something to do with it, as described by Steve Yegge[1]:- "Google is an exceptionally disciplined company, from a software-engineering perspective. They take things like unit testing, design documents and code reviews more seriously than any other company I've even heard about. They work hard to keep their house in order at all times, and there are strict rules and guidelines in place that prevent engineers and teams from doing things their own way. The result: the whole code base looks the same, so switching teams and sharing code are both far easier than they are at other places." [1]:http://steve-yegge.blogspot.com/2006/09/good-agile-bad-agile_27.html http://steve-yegge.blogspot.com/2006/09/good-agile-bad-agile...