8 ms·
Even more, what does Go have better in terms of dev tooling than Java or C#?
by tsimionescu 7y ago
Even more, what does Go have better in terms of dev tooling than Java or C#?
- deleted 7y ago[deleted]
- vips7L 7y agoIt doesn't.
- helvetica2020 7y agoComparing Go to the JVM for dev tooling not to mention the operational ecosystem is a bit silly. JVM is miles ahead.
- kasey_junk 7y agoGo fmt Code formatters are available in Java/C# but not ones that have a default set in stone.
- deleted 7y ago[deleted]
- mohaine 7y agoDitto for logging framework, unit test framework, base http framework...
- tsimionescu 7y agoThose are not dev tools, they are libraries. Also, even though there is no default built in unit test framework in Java and C#, it would be hard to claim JUnit and NUnit aren't essentially that. Ditto for log4j in Java. By the way, I'm not sure you can claim to have a logging framework in your language when it can't even differentiate between debug messages, info and error messages. I'm not sure there is any significant project that can rely on Go log that couldn't as easily use stderr/stdout.
- tsimionescu 7y agoOk. But you get to stop discussing some style choices, and instead you lose a decent debugger, a decent (open source) IDE, any graphical profiler, good package management that is separate from your source control tool, and probably a few others I'm missing. And if you care about style trivialities ,you'll still need an external linter, since go fmt doesn't enforce anything about variable names , line length, function length, comment placement, line breaking and many other things some people like to obsess over.
- andreygrehov 7y agoThe beauty of Go is that it's so simple that you don't need a debugger. Do you need a word dictionary to read this comment? No, because this comment is simple. Same with Go. But if you need a debugger, there is Delve [1], though I only used it once to debug a dynamic programming algorithm. [1] https://github.com/go-delve/delve https://github.com/go-delve/delve
- tsimionescu 7y agoI know about delve, but it's an extremely basic debugger. You can't even pause program execution on demand or execute an arbitrary function while stopped at a breakpoint. Beyond that, the complexity of a language has nothing to do with how much you need a debugger. If you are writing a complex program, you sometimes need a debugger to quickly figure out what is going wrong, instead of endless theory -> change/log -> rerun cycles.
- andreygrehov 7y ago> Beyond that, the complexity of a language has nothing to do with how much you need a debugger I disagree. There is a higher chance you need a debugger when trying to understand, say, Scala code versus Go. > If you are writing a complex program [...] Complexity of a program depends on its author. Even a stupid simple function can get complex if the programmer is less experienced. Go has a philosophy to simplify things. The community tries to follow this philosophy as much as possible, which is why a lot of Go code is easy to read regardless of how complex the logic is. In the majority of cases, a need for Go debugger means you are dealing with bad written code. Heck, this idea can be extended to pretty much any language.
- Koshkin 7y agoI wish there was Go's code diagram creation tool called "go figure."
- Kaze404 7y agoConsidering Go's tooling ecosystem is split in half (supports modules / doesn't support modules), nothing really.
- tsimionescu 7y agoTo be fair, all languages that have not had modules built in suffer from this to some extent or another. The main good part about Java is that they have compatibility between code using modules and code that doesn't.
- closeparen 7y ago- Native build system - Auto-formatting - Good first-party testing and benchmarking - Ppprof runs circles around VisualVM All these things are available for Java (MVN/Gradle, JUnit, IDEA, YourKit, etc) but having one right way to do them built in is pretty great. On a meta level, combination of the AST package and deterministic code formatting means it's relatively easy to write programs that manipulate source code.
- vips7L 7y agoJust a nit, Java Microbenchmark Harness is apart of OpenJDK so it is "first-party".
- closeparen 7y agoOh good point. We're on Java 8 and migrating to 11...
- vips7L 7y agoI've been enjoying the standard library improvements in 11. The http and websocket clients are pretty easy to use.
- tsimionescu 7y ago> All these things are available for Java (MVN/Gradle, JUnit, IDEA, YourKit, etc) but having one right way to do them built in is pretty great. It's great if you're just starting out, but it's irrelevant in the long run. It can even be harmful when it's coupled with the language, as you get things like having the packaging tool become deprecated, like with go dep, since a 3rd party tool can't compete with a first party tool for adoption, especially in a relatively young language like Go. For pprof vs VisualVM - I haven't yet done a lot of CPU profiling with them, but for memory I have had the exact opposite experience. VisualVM and Eclipse MAT are much easier to understand and have much more functionality for analyzing the memory of a Java process than pprof offers. Not sure what (pseudo-)deterministic code formatting has to do with the ease of manipulating program code, but having a built-in AST package is indeed a good idea. Too bad it hasn't been used to write any useful refactoring tools for Go (outside of JetBrains Goland? Haven't tried that yet). I have heard that Google uses go fix recipes to make modifications across their code base, but haven't seen any examples, and I doubt it can realistically be done in a code base that is not ridiculously well tested, and that it didn't require any manual intervention in a few corner cases in Google as well (assuming they did more than a rename).