Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dthul
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
181.
▲
by
dthul
7y ago
Assuming GP's post was not edited, I don't see where it implies that Rust can be used as a C replacement where C++ can't.
182.
▲
by
dthul
7y ago
It's exciting to see C++ pick up some of those ideas! Anything that improves the current situation is appreciated.
183.
▲
by
dthul
7y ago
As a counterexample: Stylo alone is already a huge success story, not some "pie in the sky promise that may or may not pan out".
184.
▲
by
dthul
7y ago
I see what you mean, but I think there are two orthogonal issues here. One is the ownership/lifetime of the heap allocation. That is indeed coupled to a stack object, because non-stack bound lifetimes can (with the current state-of-the
185.
▲
by
dthul
7y ago
Yeah, if you need "C" style struct representation (which guarantees order), you can enable that on a per-struct basis.
186.
▲
by
dthul
7y ago
Sure it does. The borrow checker is concerned about lifetimes, regardless of whether the object lives on the stack or the heap.
187.
▲
by
dthul
7y ago
I think you missed the point of Rust. It's not about replacing new/delete with RAII (even though that's a good idea for sure). How does modern C++ help you with tracking whether a pointer/reference outlives the lifetime
188.
▲
by
dthul
7y ago
The idea that Rust has the potential to produce faster binaries than C/C++ comes, I guess, mainly from the fact that (once the bugs in LLVM have been fixed) Rust will be able to apply restrict/noalias very liberally to the generat
189.
▲
by
dthul
7y ago
In Rust (end even C++ afaik) it usually makes more sense to let the callee decide. Does it need to own the value? -> Call by value. Does it only need to inspect or (visibly) mutate the value during the function call? -> Call by refere
190.
▲
by
dthul
9y ago
You probably think about Leap Motion.
191.
▲
by
dthul
9y ago
You could bind the web service to the loopback interface of the server. This way it cannot be accessed directly from the internet. Then you can use SSH port forwarding to access it from the web browser on your local machine.
192.
▲
by
dthul
9y ago
Learning weird new stuff can have a positive impact even though you don't end up using it as your workhorse though. After coding in Rust for several weeks I went back to C++ for my day-to-day work since I'm still more productive w
193.
▲
by
dthul
9y ago
Yes! Theoretically anything that Rust has support for ( https://forge.rust-lang.org/platform-support.html ) but I think most work has been put into ARM Cortex-M support recently. Especially Jorge Aparicio has worked to make e