News for hackers. Stuff that matters.
Re:Sub-10 ms Latency in Java: Concurrent GC with Green Threads by pjmlp on Wednesday August 05, 2020 @11:25AM (#24061856)
Like operator overloading and implicit conversations.
Re:Sub-10 ms Latency in Java: Concurrent GC with Green Threads by dthul on Wednesday August 05, 2020 @05:32PM (#24065858)
True, those are even more places where C++ can implicitly allocate. The operator overloading also applies to Rust. Rust has no implicit conversions though, which are arguably worse since they are invisible (that's why I usually mark all my expensive single argument constructors as "explicit").
Re:Sub-10 ms Latency in Java: Concurrent GC with Green Threads by pjmlp on Thursday August 06, 2020 @02:06AM (#24068507)
Sure it has, you cannot ensure Deref implementations don't allocate.
Re:Sub-10 ms Latency in Java: Concurrent GC with Green Threads by dthul on Thursday August 06, 2020 @02:54AM (#24068718)
While technically true, the documentation makes it very clear that Deref should only be implemented for smart pointers and never fail. So no allocations in practice.
Re:Sub-10 ms Latency in Java: Concurrent GC with Green Threads by pjmlp on Thursday August 06, 2020 @03:57AM (#24068973)
Ah problem solved then, we just need to document very clear that C code should not corrupt memory, how did I never thought of it.