s/use/move/?The problem with garbage collecting C and C++ is that objects are not allowed to use.
s/use/move/?The problem with garbage collecting C and C++ is that objects are not allowed to use.
Maybe not entirely true. This guyThe problem with garbage collecting C and C++ is that objects are not allowed to move.
https://m.youtube.com/watch?v=mbdXeRBbgDM
Yes, Rust has no builtin tracing garbage collector, but it can be implemented. And there're some implementations already.Rust doesn't GC, there's no sweep. IDK why this thread has anything about GC in it.
Maybe not entirely true. This guydid it. Go to 21:15 or so.Code:https://m.youtube.com/watch?v=mbdXeRBbgDM
Indeed. std::move is such a stupid name.The problem with garbage collecting C and C++ is that objects are not allowed to move.
^
. But granted that is a language extension rather than merely a library.Why would you do this?Yes, Rust has no builtin tracing garbage collector, but it can be implemented. And there're some implementations already.
Because there are some cases that you have to use tracing garbage collector, for exmaple vm of gc language, ui library(because of complex components relationship) and entity component system. Sometimes you can't determine which reference is primary and which is secondary, and you can't determine which should be destructed first.Why would you do this?
Maybe I'm misunderstanding or overlooking something, but isn't it possible to move physical page keeping its virtual address by OS?The problem with garbage collecting C and C++ is that objects are not allowed to move. So there is no compaction for better cache and TLB hit rates and you still have to fill fragmentation holes, Worst of all worlds, really.
If the hardware has an MMU and substantial OS; certainly.Maybe I'm misunderstanding or overlooking something, but isn't it possible to move physical page keeping its virtual address by OS?
It shoul not work for kernel level, but for application level, programs uses virtual address and runs regardless its physical address (to which physical address a virtual address is mapped cannot be known by application unless an API exists to request the data).
Overlooking, possibly. Cache lines are set associative, meaning you have N lines available for data that come from a certain address pattern. With the correct access pattern you can render almost all caching futile. Also, if all your data is small but aligned at 64 byte boundaries, you dramatically increase the memory bandwidth requirements. The cache will always read a complete line, and not care how much you actually need of that.Maybe I'm misunderstanding or overlooking something
But Rust is not a GC language...Because there are some cases that you have to use tracing garbage collector, for exmaple vm of gc language
Instead, it is for normal persons who aren't sure about they are correct. C/C++ is for very very intelligent persons. Rust is complex because it wants to ensure that you always do everything correctly, even if you know what you are doing, in this case, its syntax will seem very boilerplate and redundant.I personally find the rust documentation too overwhelming. The specification is too thick .. It feels like a language only for really very intelligent persons.
sbcl,gerbil,zig,nim,crystal,haxe,ocaml,ada,idriss2 do a better thing on this subject.
It's not only for gods but also for mortals.
And the GC Language VM is implemented by the non-GC language.But Rust is not a GC language...
I don't think the amount of documentation is a good guide here. Things with literal tons of documentation are falling apart and things with no documentation carry on and on...
There is loads of talk of software moving to Rust at least?I thought the problem is that there is too much software moving to Rust![]()
More amusingly, the 737 can not carry the documentation of the bird when it would be printed out. But then if it can't fly it won't matter if the wheels do come off...Amusingly Rust has loads of documentation and books. Purely because the culture of Rust users is that they love to talk about Rust more than actually writing software using it.
Sounds like a safe solution.But then if it can't fly it won't matter if the wheels do come off...
the rust project has a burnout problem
– Jynn Nelson. Via:
![]()
Rust is the latest open source project to face burnout
Spotting and tackling a widespread problem is a challengewww.theregister.com