Hacker News new | ask | show | jobs
Rust, Go, C++11 or Julia? Which would you choose and why
18 points by futurehuman 4512 days ago
I'm thinking of starting a new language this year but recently there have been a number of new languages which all look interesting so I'm not sure where to start dablling and which is going to be a clear future winner (if there is such a notion).

My requirements: - fun to develop in - compiled - did I mention fun?

My background: - dynamic languages (Python and Ruby) - a hint of C

My question to HN is if you were to start with a clean slate, which would you choose and why. I'm not interested in a flame war, just your personal opinions. Please be nice to one another.

12 comments

I have absolutely loved learning Go. I love simplicity; Go has aesthetics like hardwood floors and flat white walls: your ideas stand out like a fire engine red couch.

If you are used to bigger languages, there will be times when you cry out and curse the names of god because the simple, obvious feature simply is not there. There are young-language cryptic error messages.

But all the libraries are brand spanking new and beautiful, and a bunch of Serious Experienced People wrote Go with the intention of using it for the rest of their careers.

If you like that kind of thing, there's nothing more go-like than Go.

I've looked a little with Go and to be honest I thought it was awesome. It felt very Pythonic almost to the point of feeling like a dynamic language.

The only reason why i wouldn't choose Go at this point is a) it can't be linked from other languages b) can't be used for OS development c) can't be used for embedded systems (I would love to use it for Pebble or Android).

If you care about embedded systems, go with C++.
Rust will be the best one.

Rust is still under development, not really ready for production. But this makes rust more like a very good learning material for any programmer, since you can evolve with the language.

Go is also a good one. But what go provided is a very limited feature set. It's more like C in functionality, but less like C in efficiency. Well, still good for you.

C++11 is not recommended. I'm a C++ programer and use C++11 in my daily life. But as you mentioned, fun, C++ is not fun at all. It's actually very serious. There're full of bumps and hollows when you use it.

I noticed Julia last year, but not know much of it.

Ok, everything beyond is not important. The truth is you have to choose your domain of CS area. Each language is deeply connected with its development background and usage, scene. Choosing the domain is the real thing you should consider, not language.

Just like what nationality you have, what tradition you have, IMO.

What domain. That's a good question which I never thought of while considering my options. The problem I have is that I have lots of interests and each one may lean toward a different language:

- Web development (Go looks like the clear winner here)

- Graphics (C++11 or Rust)

- Big data/number crunching (C++11)

- OS development (C/C++, but possibly Rust)

I'm conflicted. After spending 10 happy years in my previous language of choice, I really don't think I have the mental capacity to learn all of the above. First Word Problems?

You certainly the have mental capacity to start learning all the above. To become a master is another goal. But having wider horizons helps always. I recommend learning by doing. Set the simple goals, use one of the languages you consider. Then repeat.
Then you may want to taste each one of them and make your decision;) I spent my collage years, about 4 years, to have almost all of my interests tried.
I would learn all 3 that aren't C++11.

I am learning Rust now. The explicit memory management is to me its defining feature. The compiler is strict, but it manages pointers/references safely. Manual memory management with fewer sharp edges (once it compiles). It seems to be blazing its own trail here. It's frustrating getting anything running when half the examples online only work on older versions of the compiler, but if you can tolerate the churn there is a lot to be learned.

Go is a very clean, simple language with a great thread/concurrency model. It seemed similar to Rust at first, but it's garbage-collected, doesn't (won't ever?) have algebraic data types, and lacks pattern matching. It does have a certain appeal: simplicity. If I only had one weekend to burn, I'd learn Go.

Focus on creating things. Not on learning things. I.e. Ask yourself what fun low-level project can I _MAKE_ instead of what technology/language/whatever can I learn.
Learning a bit of static typed language will definitely benefit you. I would start with Rust and then switch to M# when it gets released (MS has a strong track record of delivering brilliant languages - C#, F#):

http://joeduffyblog.com/2013/12/27/csharp-for-systems-progra...

Thanks I've never heard of M# before. But personally I'm linux-only so probably a deal breaker.
It depends on what you want.

If you want to write production code C++ is a definite answer. Rust and Julia are immature. Go is a badly designed language.

If you want to learn, choose Rust. It's very well designed language with interesting type system which includes many ideas from languages like Haskell, etc. Julia is a dynamic language and you won't learn a lot.

> Go is a badly designed language.

Wat.

FWIW, Go was designed for productivity, not for breaking new ground. In that respect, it has it well achieved. You just need to program in Go for a bit to realize you don't really need classes or generics or templates.

http://talks.golang.org/2014/research.slide#7

> Go is a badly designed language.

Honest question: why do you think so?

It doesn't have generics because they are "too complex". It also ignores all progress of the last 20 years in programming languages research.

Rust is much better language in this respect. It has beautiful type system.

How about Haskell or D? Depending on whether you want to go high-level or low-level. Rust and Go are not bad choices for low-level languages either. I don't know if Julia is mature enough yet.
Go is the simplest, but not quite as efficient as Rust or C++. I don't think Julia is really a general purpose language.

Rust is also good, but more complicated than Go and hasn't hit v1.0 yet.

I don't mind how hard a language is to learn, so simplicity isn't a key factor. I figure I'm going to spend the next 10 years of my life dedicating myself to something so I want to make sure it's a) going to be fun to work with b) keep me employed and c) going to still exist in 10 years time.
Considering b) and c), C++ looks like the only valid option.
a) would probably rule out C++

c) Go and Rust are likely to both see widespread adoption

What would be the reason for chosing Go over of one of the existing mainstream languages? Even if it's "better" (cleaner, more expressible, more readable etc.) than say C++ or Java, I don't see that outweighting maturity, availability of libraries/SDKs/tools, availabilitiy of developers for one of the current mainstream language.
Since you only know a hint of C, learning more about the low level and mechanical sympathy is the way to go. So I'd say go for C++
I'm not sure about that. I'm happy starting completely from scratch so I'm willing to throw out tradition.
I think julia could have a real good future. I started looking at it a couple of weeks ago and liked what I saw.

Its well worth a look IMHO.

If your background is dynamic languages, you really shouldn't miss C++, with all of its low-level stuff along with good enough high-level stuff. Even if you won't use it professionally, after C++ you'll swallow any new language in a week or two (or three, for Haskell ;)).
Rust seems like it has by far the most to teach you coming from a dynamic, interpreted background.