Rust vs. Haskell as a second language to Ruby

Hi Upcase members,

Is there a better category for this?

I am itching to learn another language and I am deciding between Haskell and Rust. I am curious if anyone here has experience with the two and would like to post some pro’s and cons.

I like that Haskell is purely functional, so (as a ruby developer) it would be a totally different paradigm to my OO mind. Haskell seems to have a great/helpful community. thoughtbot seems to support haskell which is a good sign :smile:

Rust seems to be more performant. I can see Rust replacing C in the future/taking over the world of programming. The fact that it is much “safer” to code that C is nice and I can see Rust being a nice compliment to Ruby.

Any thoughts? thoughbot, do you have any plans on exploring Rust and potentially adding trails for Rust?

John

We’ve been talking about Rust a lot lately on The Bike Shed, if you want to hear some more rubysit thoughts on it. We have another Rust episode coming in a couple of weeks as well. I’m only passingly familiar with both of them and right now I’d say I’m more interested in Rust. Just floats my boat a bit more.

Haskell and Rust are both full, general-purpose languages. You’ll be able to achieve any task with either language.

They both have strong type systems, and attempt to catch most mistakes while you compile your program instead of while your program runs.

Haskell is older and more stable. It’s pure, functional and lazy, and its type system is richer in some ways. Haskell is likely to be more different than what you already know.

Rust is newer. It’s less stable in some ways (fewer libraries available, more compiler glitches are likely) but benefits from being written in a more modern age (started out with modern tooling approaches and practices). It’s imperative and fairly procedural.

In terms of performance, both languages will seem unbelievably fast after doing development in Ruby.

Which language you choose would depend on what you want to learn and do. I’m guessing Haskell will blow your mind in more ways and that you’ll probably learn more new concepts every day you’re learning Haskell than you will by learning all the basics of Rust. However, Rust is more similar to Ruby in some ways, so if you want to get up and running with your first project quickly, it will probably be much faster to learn and use. Either way, you’ll get to learn what it’s like to program in a rich, statically-typed language.