Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
3a2d29
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
3a2d29
4y ago
It’s just a weird argument to hear someone argue “does GC buy you enough to balance out the complexity…” Isn’t the whole argument rust vs C++ that rust gives you memory safety even though it’s more complex? Like if you can tolerate memory i
62.
▲
by
3a2d29
4y ago
I don’t think so, but I can’t find the answer. Either way, rust 100% does that. Way easier in C# to avoid that issue. Just don’t use reference counters and use GC. No way to avoid that in Rust. If you need many references, you must use A
63.
▲
by
3a2d29
4y ago
Memory leaks are not memory safety. Memory leaks in all languages are safe, they just slow performance and cause crashes. Rust still memory leaks.
64.
▲
by
3a2d29
4y ago
It’s a lot harder to memory leak in Go and Java than rust. Just like it’s harder to have a memory safety issue in rust than C++. if you are worried about data races, use a language like elixir that’s more safe than rust and is great for con
65.
▲
by
3a2d29
4y ago
“But they don’t use it as much” is not an argument? It’s the whole case for Rust > modern C++ based on that? Rust can have memory issues, but “it doesn’t use unsafe as much” as modern C++. Forbidding unsafe code doesn’t guarantee vulner
66.
▲
by
3a2d29
4y ago
I’m not at all saying I do know a lot on the topic, I am saying I know enough to recognize comments that are wrong. For starters just cause you “can” have memory safety issues doesn’t mean it’s the same as Rust. I mean Rust “can” have memor
67.
▲
by
3a2d29
4y ago
On the topic of a “forced” C++ to be close to rust. I guess technically if you forced all allocations to be in unique_ptr<> and then used std::move every time you passed it as a parameter, you would kind have the first part of rust (o
68.
▲
by
3a2d29
4y ago
C# allows you to tune the GC, which I believe was the cause of that issue. Keep in mind by turning off the GC, how have now made C# just as safe as rust, not unsafer.
69.
▲
by
3a2d29
4y ago
What’s kinda annoying about comment sections on these articles is it shows how many people have opinions on this topic that they know only a bit about. Rust is safer than C++ because it does “opt-out” of memory safety, rather than modern C+
70.
▲
by
3a2d29
4y ago
Out of curiosity, are you a C/C++ dev?
71.
▲
by
3a2d29
4y ago
Maybe I am misunderstanding your comment, but there’s no way “unsafe” will be removed from rust. It’s essential to doing many things.
72.
▲
by
3a2d29
4y ago
Except Rust can still have serious memory safety errors like double-frees and memory leaks. All those other languages cannot. Rust is much less safe than a GC language in terms of memory.
73.
▲
by
3a2d29
4y ago
but with a GC, Java/Go/etc are inherently more safe than rust. Rust can have double-frees and some of the most serious memory safety errors that those cannot.
74.
▲
by
3a2d29
4y ago
Very cool!
75.
▲
by
3a2d29
4y ago
Doesn’t the compiler do some hidden allocations? And as a follow up, why use rust if allocations mean ownership rules are no longer needed?
76.
▲
by
3a2d29
4y ago
Thanks!
77.
▲
by
3a2d29
4y ago
I need a “Explain like I’m 5” for Landau--Siegel zeros. This sounds like a hard task as I couldn’t find anything online that does it :(
78.
▲
by
3a2d29
4y ago
Hmm I think they are referring to GC as “traditional” GC, but I will concede that they don’t seem to say that.
79.
▲
by
3a2d29
4y ago
And rust is unsafe if you use unsafe rust (or even if you use Arc in safe rust and reference count incorrectly). Ada doesn’t use allocation, remaining 100% memory safe.
80.
▲
by
3a2d29
4y ago
I checked and you are not correct. https://en.m.wikipedia.org/wiki/Garbage_collection_(computer... Reference counting is a type of garbage collection.
81.
▲
by
3a2d29
4y ago
Wouldn’t the performance costs of bounds checking on arrays be the same if the computer was doing it or if your code was doing it? By that logic C/C++ doing no bounds checking speeds your code up?
82.
▲
by
3a2d29
4y ago
Isn’t reference counting a type of garbage collection? I feel like you can’t put Swift in the world of Rust/Ada/C/C++
83.
▲
by
3a2d29
4y ago
Although the article is about Ada, which is technically more memory safe than rust.
84.
▲
by
3a2d29
4y ago
I was expecting this to be a rust article lol. Ada is more memory safe than rust technically, although with less devs using it.
85.
▲
by
3a2d29
4y ago
Obviously not corporate, but I believe Rome had 1 year term limits for its 2 consuls.
86.
▲
by
3a2d29
4y ago
But surely if CEOs had term limits then the good ones would be jumping from one company to another, so if they think too short term then no board would hire them. Boards would hire the CEOs that set the next one up for success. Kinda like h
87.
▲
by
3a2d29
4y ago
That’s not an attack. I think they are just trying to make the point that once you enter unsafe rust, you can use any unsafe language since the biggest benefit of rust is gone. Unsafe rust is not used often, they never argued that.
88.
▲
by
3a2d29
4y ago
Maybe you doubt it, but it isn’t bigotry to question your motives because of your birth. Especially when your birth is a great fortune
89.
▲
by
3a2d29
4y ago
The idea that something has to be on the news to be effective is hilarious. If most Americans curved their consumption (didn’t buy the latest iPhone every year, drove less) that would do way more than any climate change awareness. I get tha
90.
▲
by
3a2d29
4y ago
I don’t think the borders are that fuzzy. Who has a C++ repo that isn’t in a low level language because it has to be? There is no production repo where python gets fast enough to replace Rust/C++. Still great to see improvements becaus
More ›