Live data from Hacker News

Why Rust?

rerun.io

41–50 of 294 posts

Re: Why Rust?

#41

Earlier quoted context omitted.

Reference counting is much slower than 'garbage collection'.

Reference for "much" slower? Surely depends on usage? The cost is also more predictable/amortised than classic garbage collection.

It's generally true to be fair, reference counting could be used for every garbage collected language (and be much simpler). The only reason they switched to more complex schemes is they're faster on average. Even smart schemes that try to remove unnecessary ref count changes will tend to underperform compared to a (well built) tracing GC. As for a reference, https://en.wikipedia.org/wiki/Tracing_garbage_collection#Per...

The point about predictability is totally valid though (and combined with simplicity is the reason many languages still pick ref counting).

Re: Why Rust?

#43
post #6

Earlier quoted context omitted.

They seem pretty universal to me. For example, the tedious error handling in Go that is mentioned is a turn-off to a lot of developers. Safety and speed are both things most languages strive for, and if Rust is not THE fastest or THE safest language, it’s on the efficient frontier of the two.

Quoted post unavailable.

Emil has been working in Rust for eight years. Hardly a honeymoon phase.

As for your accusation of lying: I cannot imagine where you’ve pulled that from. Emil’s description of unchecked exceptions as invisible errors insofar as you can’t see where errors might occur from the source code alone is objectively an accurate and reasonable description.

Re: Why Rust?

#44
post #6

Earlier quoted context omitted.

They seem pretty universal to me. For example, the tedious error handling in Go that is mentioned is a turn-off to a lot of developers. Safety and speed are both things most languages strive for, and if Rust is not THE fastest or THE safest language, it’s on the efficient frontier of the two.

Quoted post unavailable.

Exceptions are invisible though? (unless you're using checked exception in Java, which nobody does and neither python nor C++ offer). I've personally found unexpected exceptions being thrown to be one of the main causes of unreliability in production applications I've worked on. Of course you can have a blanket catch statement so it doesn't entirely crash your app, but that doesn't compare to the Rust experience where those errors almost never happen.

Re: Why Rust?

#45
post #6

Earlier quoted context omitted.

They seem pretty universal to me. For example, the tedious error handling in Go that is mentioned is a turn-off to a lot of developers. Safety and speed are both things most languages strive for, and if Rust is not THE fastest or THE safest language, it’s on the efficient frontier of the two.

Quoted post unavailable.

This is personal preference of course, but exceptions are essentially "on error GOTO foo". They never resonated well with me either, since the control flow is muddled once you introduce exceptions.

> "invisible errors"

If you read further on you get the author's justification for this claim:

    auto result = foo().bar();
> As a reader, I can't see where potential errors can occur. Even if I look at the function declaration for foo and bar I won't know whether or not they can throw exceptions [...]

Do you disagree with the reasoning reasoning this?

Re: Why Rust?

#46
post #4

Earlier quoted context omitted.

> dynamic lifetimes What do you mean ? If you refer to heap allocations, then you can use Box, Arc, Rc. They are not a "garbage collector" nor do they incur performance hits other than a regular heap allocation.

Reference counting is much slower than 'garbage collection'.

[deleted]

Re: Why Rust?

#47
post #31

Earlier quoted context omitted.

> Too bad most of the Rust jobs right now seem to be in crypto. What is the problem with that?

Potential criminal liability and resume stench. Would you hire ex scammer/ponzi to maintain your backend? I wouldn't.

Yeah, I wouldn't hire someone from a company who caused mass genocide and ran a fake news propaganda machine and then and profited billions from it [0] and is also using Rust as well then. /s

[0] https://www.globalwitness.org/en/campaigns/digital-threats/r...

Re: Why Rust?

#48

I've started working in Rust too and I too find it a tremendous breath of fresh air. It's the first time I've been excited about a new programming language in many years. C++ promised to be a language that was both high performance and very expressive but I always found it very difficult to work at a high level of abstraction in C++. The sharp details always stab through. Rust code, on the other hand, often doesn't l…

> I always found it very difficult to work at a high level of abstraction in C++.

That's the opposite of my experience. The ability to abstract is exactly what I miss since working with C#, with much useful stuff removed to please incompetent developers and their managers.

Re: Why Rust?

#49
post #31

Earlier quoted context omitted.

> Too bad most of the Rust jobs right now seem to be in crypto. What is the problem with that?

It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. If you manage to land on the 1/100 that actually does something useful and survives, well, better odds than the lottery I suppose.

Sounds a lot like Silicon Valley circa. 1999

Re: Why Rust?

#50
post #31

Earlier quoted context omitted.

> Too bad most of the Rust jobs right now seem to be in crypto. What is the problem with that?

It's a bubble, 99/100 crypto companies are going to crash and burn, or already have. If you manage to land on the 1/100 that actually does something useful and survives, well, better odds than the lottery I suppose.

> It's a bubble, 99/100 crypto companies are going to crash and burn, or already have.

I'm sure this is the 990th time that I have heard this. The fact is, it isn't going away and it seems even more crypto companies have taken interest in using Rust and that is good.

Even some (crypto) companies are sponsoring the Rust Foundation as silver members. Nothing wrong with that. [0]

[0] https://foundation.rust-lang.org/members

Post reply on HN