Re:Go for C++ Programmers
by IshKebab on Friday February 06, 2015 @06:19PM
(#9012227)
Rust isn't ready yet so I wouldn't pick that.
Scala I'm not familiar with.
C++ is great. Very fast and powerful, and really not as complicated or difficult as people make out. The manual memory management thing isn't really an issue if you do it right. However writing multithreaded C++ code is never fun.
Go is very simple and easy. I think of it like Simple English. It's very easy to write, and everyone will understand what you are saying, but you'll end up being way more verbose and often a bit more clunky than you might be in a more powerful language like C++. Huge limitations are that there is no overloading at all. I.e. you have to implement `minFloat64(a, b float64)`, `minFloat32(a, b float32)`, `minInt(a, b int)` and so on, whereas in C++ function overloading means it is just `min()`, and templates mean you only need to write it ones. The other big issue is lack of templates (AKA generics), so containers (list, map, etc.) are a pain in the arse to use.
However Go does have great concurrency support, and is close enough in speed to C++ that I'd probably always choose it to write servers in.
So I'd say Go, maybe C++. In a year reconsider Rust.
Scala I'm not familiar with.
C++ is great. Very fast and powerful, and really not as complicated or difficult as people make out. The manual memory management thing isn't really an issue if you do it right. However writing multithreaded C++ code is never fun.
Go is very simple and easy. I think of it like Simple English. It's very easy to write, and everyone will understand what you are saying, but you'll end up being way more verbose and often a bit more clunky than you might be in a more powerful language like C++. Huge limitations are that there is no overloading at all. I.e. you have to implement `minFloat64(a, b float64)`, `minFloat32(a, b float32)`, `minInt(a, b int)` and so on, whereas in C++ function overloading means it is just `min()`, and templates mean you only need to write it ones. The other big issue is lack of templates (AKA generics), so containers (list, map, etc.) are a pain in the arse to use.
However Go does have great concurrency support, and is close enough in speed to C++ that I'd probably always choose it to write servers in.
So I'd say Go, maybe C++. In a year reconsider Rust.