News for hackers. Stuff that matters.
Re:Choosing Nim out of a crowded market for systems programm... by jmartin2683 on Friday November 25, 2022 @06:32PM (#33748129)
I really can’t understand where this idea that rust is ‘hard’ comes from. Everything that it formalizes is something that you should already be conscious of. If not, well… you have a different, bigger problem.
Re:Choosing Nim out of a crowded market for systems programm... by planetis on Friday November 25, 2022 @06:49PM (#33748266)
Can you explain to us what's the bigger problem we should be addressing according to your opinion sir?
Re:Choosing Nim out of a crowded market for systems programm... by jmartin2683 on Friday November 25, 2022 @07:40PM (#33748619)
You’re creating lots and lots of bugs that will come back to haunt to at runtime (midnight on a Friday if the universe has its way).
Re:Choosing Nim out of a crowded market for systems programm... by lolinder on Friday November 25, 2022 @10:54PM (#33749740)
You're assuming everyone is coming to Rust from C. People who are learning Rust from a garbage-collected language will absolutely feel that Rust is harder than what they're used to, and not because they were writing bug-ridden code in Java or whatever.
Re:Choosing Nim out of a crowded market for systems programm... by moldavi on Saturday November 26, 2022 @01:11AM (#33750414)
Single ownership often introduces bugs of its own. In Java, I never need to create an Err if the thing my ID is "pointing" to isn't around anymore in whatever hash map the borrow checker made me store it in.

It's good in some cases, bad in others.

Re:Choosing Nim out of a crowded market for systems programm... by wiseowise on Saturday November 26, 2022 @03:29AM (#33750984)
> In Java, I never need to create an Err if the thing my ID is "pointing" to isn't around anymore in whatever hash map the borrow checker made me store it in.

What’s the problem here in Rust?

Re:Choosing Nim out of a crowded market for systems programm... by wk_end on Friday November 25, 2022 @06:58PM (#33748324)
That's true only in comparison to languages with manual memory management. Higher level languages spare you the burden of being conscious about these things, which means Rust is naturally going to be more difficult to work with than, oh, I dunno, Ocaml.

From the other direction, coming from low-level languages: the other problem is that Rust's type system isn't powerful enough to express certain things that you, a competent C programmer, might be fully conscious of...and so you end up needing to fight the type system to get it understand something you're already aware of. To use a classic example, you can understand exactly how the lifetimes work in a doubly linked list but still find it more painful to write in Rust than in C.

Re:Choosing Nim out of a crowded market for systems programm... by jmartin2683 on Friday November 25, 2022 @07:41PM (#33748625)
Memory things, sure. There is the whole concurrency/parallelism thing, though.
Re:Choosing Nim out of a crowded market for systems programm... by moldavi on Saturday November 26, 2022 @01:10AM (#33750408)
Pony is a great example of fearless concurrency without the borrow checker's problems.
Re:Choosing Nim out of a crowded market for systems programm... by fredrikholm on Saturday November 26, 2022 @05:08AM (#33751458)
It's a shame how seldom this language comes up in discussions, I toyed around with a few years back and it was wonderful even back then.

Happy to see that it's getting frequent commits, would love to see it become more popular.

Re:Choosing Nim out of a crowded market for systems programm... by aussiesnack on Friday November 25, 2022 @09:18PM (#33749200)
It's not an 'idea'. Many people find it hard (I do). You might not understand why this is the case, but that they (we) do is an empirical fact.
Re:Choosing Nim out of a crowded market for systems programm... by afavour on Friday November 25, 2022 @10:37PM (#33749642)
Not really. Plenty of languages are garbage collected so you don't need to consider the intricacies of memory management. That was one of the biggest issues I found when I first started writing Rust.
Re:Choosing Nim out of a crowded market for systems programm... by moldavi on Saturday November 26, 2022 @01:08AM (#33750404)
That absolute claim is simply not true. That's like saying that people need to avoid shared mutability in every program, which simply doesn't make sense for a lot of programs, especially if you have a garbage collector already.

It's only a useful tool that has some nice qualities in some settings. It's not some underlying truth of the cosmos, it's just a situationally useful way to do things.