3 ms·
> They're just built for features of Go They're inferior, and do not cover the same grounds (e.g. "enums" in golang are just integer constants, you can't code
by azth 5y ago
> They're just built for features of Go
They're inferior, and do not cover the same grounds (e.g. "enums" in golang are just integer constants, you can't code gen using golang tags, JFR is way way more comprehensive than anything that golang has etc.)
The GC selection, JIT, and hot swapping/reloading are features that do not exist in golang, and we've seen what hoops people have to jump through when they face issues that can only be resolved by them. Basically, they're features most people don't know they need them until they do, then they'er already in a big mess.
You can write a Java app in golang or assembly, but it won't be anywhere near as maintainable, clear, concise, debuggable, or correct.
- shadowgovt 5y agoWhy does golang need JIT when it already statically compiles to a non-virtual machine target? It could probably use some performance optimizations, but JIT would be redundant when it's already compiled.
- azth 5y agoJIT makes things like the JFR possible.
- shadowgovt 5y agoHonestly, this thread is the first I've heard of Java Flight Recorder, so while I'm sure it has uses, it doesn't seem vital. Nice-to-have (I've certainly enjoyed something similar writing JavaScript in a browser for years), but most developers aren't writing code under tight-enough constraints to justify a profiler running under a virtual machine.
- cy_hauser 5y agoEnums in Go are inferior but that doesn't stop you from using them in the same way. Of course you can code gen using Go's tags. It's done all the time. As already pointed out, Go has the JFR it needs, not what Java has. Go doesn't need a JITter. Go isn't perfect, but neither is Java or C#. Go code is known for being maintainable and easy for newcomers to read so your last line applies to Java more than Go. But it seems like you want to hate Go. Why?
- azth 5y ago> Enums in Go are inferior but that doesn't stop you from using them in the same way. It does, I have to think twice because I know I'm not getting the compile time features that Java offers, and may end up just using strings in an awkward manner. > Go has the JFR it needs, not what Java has That doesn't make sense. All programs need the JFR that Java has, otherwise you wouldn't see companies like Datadog doing well. > But it seems like you want to hate Go. Why? I've used it in several large projects at my employer, and in every single project, Java would have been a superior alternative. We've had issues that would not have happened in Java due to many things, such as better error handling in Java, enum support, better frameworks and libraries to interact with the DB, etc. And no, golang is not known for being maintainable, it's just things that some people parrot without proof. It's basically marketing. There's nothing in the language that inherently makes it more maintainable than Java/C#/etc., and in fact, it has many things that make it less maintainable.
- cy_hauser 5y agoI've coded Java, C#, and now Go and have spent years doing each. My experience differs from yours. Clearly our experiences differ and that's okay. I occasionally support Go and occasionally bash Go but really I don't have the passion to dislike any language as much as you seem to. Be well.