5 ms·
>Go was built explicitly to solve the real everyday problems of working in a large code base, largely driven directly by experience of several industry titans.
by gameswithgo 6y ago
>Go was built explicitly to solve the real everyday problems of working in a large code base, largely driven directly by experience of several industry titans.
So have all languages, with wildly different philosophies about how to do that. We collectively just don't have any idea what we are doing. Clearly nobody has stumbled on a big win or one particular language would start dominating the industry due to the productivity bump.
- deleted 6y ago[deleted]
- BobbyJo 6y ago>So have all languages, with wildly different philosophies about how to do that. I think what you refer to as differing philosophies are in fact differing goals, and the goal of Golang is very different from pretty much all other modern languages: simplicity. I think boiling everything down to 'they are all trying to do it better' misses the fact that the 'it' they are trying to do better is very different in some cases.
- gher-shyu3i 6y ago> simplicity This has to be quantified. Simplicity in the language, perhaps. It definitely does not translate into simplicity of resulting programs, and the ease of being able to reason about them, or write them.
- BobbyJo 6y agoHaving spent about 3 years each in Java, C++ and Golang, and getting a good amount of time with Python, I have to disagree with your final few points. Golang's simplicity in the spec itself DEFINITELY gives down stream benefits, simplifying a lot more beyond itself. That includes writing and reasoning about code.
- gher-shyu3i 6y agoHaving worked on several large golang code bases, its verbosity is tedious to deal with. It doesn't lend well to IDEs (e.g. it's so easy for a struct to accidentally implement interfaces it doesn't mean to because of structural typing). Error handling is always a mess, it doesn't have enums, and so many issues to list here that Java doesn't have. The golang authors' weird obsession with not having any methods on strings for example, makes it horrendous to work with them (e.g. can't chain someString.trim().toUpper().endsWith("...")). Don't get me started on the supposed fast compile times. Parsing is fast (but so almost any other language that is not C++ or Scala), but linking is horrendously slow. Modifying and re-running individual unit tests takes seconds at a time due to relinking. In Java, it's in a blink of an eye because there is no linking.
- BobbyJo 6y agoHaving to use functions on built in types like strings.HasSuffix(strings.ToUpper(...)) isn't that bad to me. If I'm chaining a bunch of function calls on a single string, I'll want to separate them on different lines for readability anyway. It'll be creating and destroying a few implicit copies either way, so I have never really felt any pain from that. Java has no linking, but you have to go through the JVM. Golang produces native binaries. Not really a fair comparison. That being said, my brain is normally a way larger bottle neck than linking time for unit tests. I'll cede the gripes with enums and error handling (although I hated the way Java exceptions always ended up way too overloaded way more), but I find the typing a really good balance between strong and weak. It's strong enough that you have to be doing something really weird to mess up, but weak enough to be flexible.
- gameswithgo 6y agoIt is your position that Go is the only language aiming for simplicity? Are you relatively young?
- BobbyJo 6y agoNo, I don't think it is the only language aiming for simplicity. I do, however, believe it has been the must successful at it. Young at heart :)
- bccdee 6y ago> Clearly nobody has stumbled on a big win or one particular language would start dominating the industry due to the productivity bump. This is what happened with Python. It provided a distinct productivity advantage over C & C++, and now no one writes web apps in C++ anymore. Granted, it's not just Python anymore, but newer languages learned from Python's success.
- gameswithgo 6y agoGarbage collection got a clear productivity gain over not garbage collection. But it isn't clear that the various takes on GC languages, Python, Java, C#, Go etc have led to any one clear winner.
- ska 6y ago> Python, Java, C#, Notably, we've had garbage collection for nearly as long as we've had programming languages - so this has been going on much longer than the examples you give would suggest.
- bccdee 6y agoI'd argue that Java ultimately failed to innovate over C++ in the way that Python did. It added GC, but it's still clunky and hard to work with. In that sense, it's more of a pre-Python language, even though it's a few years younger than Python.
- jokethrowaway 6y agoFirst we had web apps written in Java, then Perl, PHP. Python's popularity for web app development came way later (django was released in 2005)
- bccdee 6y agoPython was originally written as a reaction to C & C++. It didn't really hit the mainstream for web apps until much later, granted, but when we compare it to the languages it was originally competing against, the difference is pretty clear.
- michael1999 6y agoI don't think you mean that, or you misunderstand how Javascript or PHP came to be.
- gameswithgo 6y agoIf I didn't understand how javascript came to be, I would be suggesting that javascript must be the best language!
- nemo1618 6y agoI actually don't think this is true, which is kind of nuts. Programming languages generally fall into two categories: 1) They were either designed by one or two eccentrics, and thus contain a few great guiding principles and many questionable ideas, which invariably come back to bite large projects; or, 2) They were designed by a committee who tried to make the Final Universal Language that would solve every possible problem, resulting in a kitchen-sink mess of a language with a 400-page specification that no one reads. Most mainstream languages made some attempt to serve software-at-scale; for example, OO used to be the obvious thing that would make software more maintainable, so most languages support it at least in part. But if you look at a language like C++, it's obvious that many of its features were added simply because they were cool or increased expressiveness (e.g. operator overloading) without regard for long-term maintainability. Even things as mundane as "implicit 'this'" are clearly harmful to readability, with specious benefit. AFAIK, Go is the only language that really takes engineering seriously: https://talks.golang.org/2012/splash.article https://talks.golang.org/2012/splash.article If there are similar articles for other mainstream languages, I'm certainly curious to read them and see how they hold up today!
- gher-shyu3i 6y ago> https://talks.golang.org/2012/splash.article https://talks.golang.org/2012/splash.article The shortcomings listed in that talk are mainly against C and C++. Other serious languages and platforms like Java, C#, and also Rust have solved these issues.
- gameswithgo 6y agoI think what is actually going on is that Rob Pike's ideas about how software engineering should work resonate strongly with you, while Anders Hejlsberg, Don Syme, James Gosling, Christ Lattner, and Rich Hinkey does not resonate with you. I think it would be a difficult argument to suggest that those other people do not have similar engineering chops, or haven't been around a long time. But if you are right we should see Go winning in the marketplace more and more in the future in a way unprecedented for programming languages.
- 6y ago