News for hackers. Stuff that matters.
Re:Green vs. Brown Programming Languages by afiori on Thursday April 22, 2021 @11:28AM (#26903844)
GC and tracking ownership are orthogonal; the lifetimes of GC references and normal references would be different, but rust could perfectly well have a GC by default
Re:Green vs. Brown Programming Languages by simiones on Thursday April 22, 2021 @12:46PM (#26904886)
It could, but it won't. If we're talking about real-world use, this makes all the difference.

C or C++ could have a GC as well (in fact, they do - you can use Boehm for any C or C++ program), but there are approximately 0 programs that do.

Re:Green vs. Brown Programming Languages by pjmlp on Friday April 23, 2021 @02:45AM (#26911710)
C++/CLI, C++/CX and Unreal C++ are example of C++ programs that do use some form of GC, just not Boehm.
Re:Green vs. Brown Programming Languages by simiones on Monday April 26, 2021 @08:57AM (#26942022)
I didn't know about Unreal C++ using a GC, but the others have extremely little use. So little, that C++/CLR (at the time) had a bug for at least 2 years where doing something like initializing a CLR List (CLR, not std::) with an initializer list (I have forgotten the exact syntax, but it is similar to `auto lst = new List<int>{a, b}`) would allocate millions of elements on the heap (if I remember correctly, it would create a List of size 0xC0FFEE, or maybe it was 0xDEADBEEF - either way, obvious debug code, then set list[0]=a and list[1]=b).