Live data from Hacker News

Tell HN: Rust Is Complex

news.ycombinator.com

71–80 of 102 posts

Re: Tell HN: Rust Is Complex

#71
post #69

Earlier quoted context omitted.

Rust doesn’t handhold you for anything low-level. It’s just that Rust hides all that complexity beneath Unsafe Rust, which is an eldritch language that no one quite knows all the rules yet (including things related to undefined behavior…) I hope the MiniRust project ( https://github.com/RalfJung/minirust ) succeeds in writing a formal spec of it someday.

ok, so you just confirmed rust does some stuff behind the scenes for you. and that comes at a cost. what is more important is to understand how to architecturally build software and achieve performance and maintainability and so on. i rather spend my limited hours becoming better in a language like c or c++ which is not going away anytime soon than learning syntax, a new way of thinking and a package management syste…

[deleted]

Re: Tell HN: Rust Is Complex

#72

Earlier quoted context omitted.

> Otherwise you can just wrap everything in Arc, Cow and similar helpers and call it a day. … which is how we got slow, bloated legacy C++ codebases today, should we make the same mistake with Rust? If you are wrapping everything in ref-counted smart pointers it might probably be better to just use a garbage-collected language like Java or C# instead…

It's an giant exaggeration to blame "slow, bloated legacy C++ codebases today" on smart pointers.

[deleted]

Re: Tell HN: Rust Is Complex

#73
post #69

Earlier quoted context omitted.

Rust doesn’t handhold you for anything low-level. It’s just that Rust hides all that complexity beneath Unsafe Rust, which is an eldritch language that no one quite knows all the rules yet (including things related to undefined behavior…) I hope the MiniRust project ( https://github.com/RalfJung/minirust ) succeeds in writing a formal spec of it someday.

ok, so you just confirmed rust does some stuff behind the scenes for you. and that comes at a cost. what is more important is to understand how to architecturally build software and achieve performance and maintainability and so on. i rather spend my limited hours becoming better in a language like c or c++ which is not going away anytime soon than learning syntax, a new way of thinking and a package management syste…

[deleted]

Re: Tell HN: Rust Is Complex

#74

Rust have nice ideas but the execution is very poor - noisy syntax - concerning and very bad compiler performance I can definitely see Swift replacing Rust in the short term, Apple seems to be committed

Rust and Swift are not really competing in the same space. And nobody trusts Apple for cross-platform support.

> Rust and Swift are not really competing in the same space.

Rust is trying competing yes, Swift is not trying to compete, they use it, they do what they have to do [1]

What happened to Mozilla's Rust plan with Firefox? so far, no bueno

> And nobody trusts Apple for cross-platform support.

Swift supports a wide range of targets and architectures [2]

They officially provide release build for all major OSs [3]

[1] - https://github.com/apple/swift/blob/main/docs/OwnershipManif...

[2] - https://github.com/apple/swift/blob/aff7c14d92fd241aff85ba4c...

[3] - https://www.swift.org/download/

Re: Tell HN: Rust Is Complex

#75
post #50
post #6

Earlier quoted context omitted.

> I am not sure that we won’t see Rust going all in on async as a mistake. I'm about a month into Rust, but Rust didn't go all in to async; it only went halfway in, which is why some functions are async and others aren't. Erlang is all in on async/green threads/tasks. From what I gather, so is Loom. There's no special way to write async code, you just write regular code and it works; for Loom you just spawn your thre…

Erlang isn't async. The actor model is great because you only have to think in single threaded mode. And with immutability being a core language feature, data races and other concurrency issues are literally impossible.

It's got async messaging, so it's not not async either. It's also got the trick that every function call is a potential premption point, and immutability means you can't go very long between function calls.

Re: Tell HN: Rust Is Complex

#76

I think I need someone to explain Rust async to me. I think I understand that await causes the half of function to be rewritten into a state machine that returns immediately to caller and the promise object implements the rest of the control flow. I don't understand waiters, pollers.

Waiters and pollers are artifacts from the fact that Futures in Rust are lazily scheduled, unlike Javascript, for example, where Promises are eagerly scheduled and executed. When you don't want to block your process and program in a reactive, non-blocking way, which is what futures and promises are an implementation of, what you are actually defining is something like this: > "our process will do some synchronous wor…

a minor point, but perhaps coroutines, stackful or not, should be distinguished from threads.

Re: Tell HN: Rust Is Complex

#78
> But Rustaceans kind of like to laugh at Go, because it's not as expressive or elegant a language by comparison.

Ironic because safe Rust can't express many valid programs, like those with cyclic data structures.

> Some parts of Rust are starting to remind me of the horror I ran from with C++.

Rust is most certainly designed for C++ programmers. C is all about minimalism and simplicity. I think there is a niche for a C like language with memory safety that retains the simplicity of C. Rust isn't it.

Re: Tell HN: Rust Is Complex

#79
post #78

> But Rustaceans kind of like to laugh at Go, because it's not as expressive or elegant a language by comparison. Ironic because safe Rust can't express many valid programs, like those with cyclic data structures. > Some parts of Rust are starting to remind me of the horror I ran from with C++. Rust is most certainly designed for C++ programmers. C is all about minimalism and simplicity. I think there is a niche for…

Is there a subset of Rust that fills that need, like how there's a subset of C++ that's still reasonable?

Re: Tell HN: Rust Is Complex

#80
post #78

> But Rustaceans kind of like to laugh at Go, because it's not as expressive or elegant a language by comparison. Ironic because safe Rust can't express many valid programs, like those with cyclic data structures. > Some parts of Rust are starting to remind me of the horror I ran from with C++. Rust is most certainly designed for C++ programmers. C is all about minimalism and simplicity. I think there is a niche for…

>C is all about minimalism and simplicity. I think there is a niche for a C like language with memory safety that retains the simplicity of C.

Isn't that the aim of Carbon, the Google-backed language whose specification was announced a few months ago? I might be wrong.

Post reply on HN