Hacker News new | ask | show | jobs
by Fiahil 1636 days ago
Usually, you don't start learning a new language with multithreaded operations..

In that sense, adding a gc to rust for single threaded programming, is almost useless : it's not helping that much and you're not learning.

4 comments

> Usually, you don't start learning a new language with multithreaded operations..

When I have started with rust I was not writing stuff with Box/Rc/Arc... or even explicit lifetimes. Not saying that I was cloning everything but for simple stuff you can come long way with just moving and simple borrowing.

Depends if it's your first language, probably.

For an already experienced programmer, it's hard not to think about using multiple threads, even when just starting in the language. I know my few first Rust programs were using multithreaded constructs and I found that especially easy to do safely in Rust (when I started, there was already crossbeam and rayon, both making a lot of things easier).

Due to the type of software I do that is exactly how I look at new language: How it handles concurrency, what kind of synchronization primitives it offers, how it manages lifecycle etc. etc. If it does not provide enough facilities in comprehensible way then it essentially useless to me. I do not learn languages just for the f.. of it.
> Usually, you don't start learning a new language with multithreaded operations..

Why not? I mean, maybe not your first ever programming language, but - why should you not get used to doling out work to all available threads to begin with?

Because multi-threaded programs are largely unnecessary for solving many problems (as the popularity of python has aptly demonstrated).
If you already have the required experience for writing working multithreaded programs, then learning Rust isn't going to be an issue !

If you don't or are unsure about that, then stick to simpler forms of programming or use type-hinted Python instead.

This would the recommendation I would make to anyone asking me that question !