5 ms·
Even now Java is pretty much defacto in many places. Go does not scale well and it is a dumb language, not that that is bad. But just that it does not feel lik
by mrath 8y ago
Even now Java is pretty much defacto in many places.
Go does not scale well and it is a dumb language, not that that is bad. But just that it does not feel like a improvement to switch to Go.
Rust is still new and I think it will not get mass adoption like Java because of higher learning curve.
- dan-robertson 8y agoI’m slightly unconvinced by the learning curve thing about rust. C++ has a high learning curve too but it is used very widely. I don’t really think rust has a higher learning curve than C++. The main differences are the borrow checking (instead of having to learn and unreliable manually check memory usage everywhere), the type system having more ML-style polymorphism instead of crazy templates, and instead of inheritance with tables being implied by class, vtables are independent things (ie traits) and work largely like implementing multiple interfaces in c++ but without the inheritance and with implied instances from some rules. The rest of the differences are just having different standard libraries/tool chains. I don’t think that, for a novice knowing neither, rust is somehow much harder than c++
- chipperyman573 8y agoC and C++ are also both taught in almost every university (at least in America but I assume in other places as well). You can't really say the same for rust.
- steveklabnik 8y agoThere have been university classes on Rust, but nowhere near C++ or Java, it’s true.
- dan-robertson 8y agoC is nearly 50 years old. C++ is 35 years old. Rust is 8 years old. Rust 1.0 is 4 years old. I think it is reasonable to guess that this is the reason rust is not taught so much at universities. Especially at universities which choose things based on what they think industry wants or what the professors know as this will lag behind actual trends in industry too. I think this argument only really applies to rust’s learning curve if one assumes that each year universities asses the programming language world for the best teaching languages and pick out those which can be used for the courses and are easiest to use. They obviously do not do this and you can tell because they picked c++ (which is actually at least three languages to learn with the preprocessor macros and the functional programming language that is hidden in the template system)
- mrath 8y agoI love Rust and all my personal side projects are in Rust nowadays. But rust is definitely not close to the learning curve of golang and Java. In comparison with C++ I am not too sure.
- jefftk 8y ago> Go does not scale well What do you mean? I've seen huge services built in Go handling an enormous amount of traffic. (Disclosure: I work at Google, primarily in C++ and JS)
- mrath 8y agoI was not intending to say that there can't be huge code bases with go, but java, C# with the tooling, eco system, less verbose and a much better static type system scale much better. There is still some areas where golang doing great, like CLIs and infrastructure tools. I definitely understand its simile design but I would very unlikely going to use golang where I can use Java.
- cutler 8y agoJava/C# less verbose than Go? In which alternate reality?
- apta 8y agoMy current employer uses golang for the majority of their code base. Absolutely agree that Java would have been more concise. There’s almost nothing in golang that lends itself to writing shorter code. Error checking is verbose and dumb. Need to define interfaces just for the sake of mocking, even if they have a single implementor. No map/filter/takeWhile/etc. meaning a single or 2 line in Java ends up taking 5-10 lines and more, with helper functions littered throughout the code base, making code harder to follow and ending up with more code. Even a simple example like final var a = foo() ? bar() : baz(); Is several lines in golang, which doesn’t even have an analogy to ‘final’ var a int if foo() { a = bar() } else { a = baz() }
- mrath 8y agoI never thought that there will be a modern programming language that is more verbose than Java. But there you go, golang proved me wrong. and Java is getting less verbose with each release. The major pieces of verbosity in Java is auto-generated by IDE anyway.
- Matthias247 8y ago> Go does not scale well Are there any articles to back this up? I'm aware that the scheduler and networking integration are certainly opinionated. Nevertheless it seems to work very well for most applications that I have seen so far.
- mrath 8y agoI mean code base does not scale well, not performance. Performance of golang is top notch.
- Matthias247 8y agoHave you e.g. checked the Kubernetes codebase? It's pretty much huge. I would agree that at least the past iterations of Go dependency management might not have been ideal (but neither was it e.g. for C/C++), but that that apparently hasn't prevent people from building huge projects with it.
- apta 8y agoYou can have large code bases in assembly and C and python. Just because you can it doesn’t mean you should. Golang does not have any useful features for defining and navigating large code based. The way imports are handled is dumb and verbose. Seriously you can’t import a specific struct or function? Also other things like you have to import “strings” to use features like split and substring, instead of them being defined on the string struct itself, which makes code awkward. No string interpolation which is quite ridiculous. The list goes on.
- apta 8y agoWasn’t it Kubernetes that was notorious for having large amounts of code being auto generated and checked in because hey, no generics.
- 127 8y agoI don't really buy Rust learning curve. The good IDE integration and package management makes it all a breeze. VScode with RLS is great. I went from zero to fully shipped software inside a week, with meager C++ knowledge beforehand. Only trouble was understanding lifetimes and getting the borrow mechanics solidified in my spine. The entire set of language constructs is actually very small, there's just a couple of new unfamiliar concepts. Biggest downside compared to C++ is absolutely library support. Sorely missing many powerful C++ libraries.