Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Fil-C is one of the most unrated projects I've ever seen

When's the last time you told a C/C++ programmer you could add a garbage collector to their program, and saw their eyes light up?



A lot of the frameworks do it. There's RC in GNOME/GTK, C++ stdlib, and built into Objective-C.

And of course it's easy to think of lots of apps that heavily use those or another form of GC.


Regardless of what you consider a GC (let's not have that debate for the millionth time on the internet...), for the point I was trying to make, I was not including RC as a form of GC. And I don't think Fil-C relies solely on RC either.


Exactly, the Venn diagram of programmers using c/c++ and programmers who can use a garbage collector for their workload is two circles.


Definitely not true. I've been using Boehm GC with my C/C++ programs for decades — since the 90s, at least.


Does this also hold true when you look at codebases that others also worked on, rather than just you?


A lot of C++ programmers use C++ and garbage collection daily because their C++ compiler uses a tracing garbage collector.

https://gcc.gnu.org/onlinedocs/gccint/Type-Information.html


Which only appears relevant if you disregard critical differences like this:

The GCC garbage collector GGC is only invoked explicitly. In contrast with many other garbage collectors, it is not implicitly invoked by allocation routines when a lot of memory has been consumed. [1]

[1] https://gcc.gnu.org/onlinedocs/gccint/Invoking-the-garbage-c...


Except for:

- Me. I'm a C++ programmer.

- Any C++ programmer who has added a GC to their C++ program. (Like the programmers who used the web browser you're using right now.)

- Folks who are already using Fil-C.


I’m also a C++ programmer, I can’t even use half of the C++ stdlib for real time thread work, I certainly can’t use a GC.


There are many C++ programmers and we are not the same!

My original foray into GCs was making real time ones, and the Fil-C GC is based on that work. I haven’t fully made it real time friendly (the few locks it has aren’t RT-friendly) but if I had more time I could make it give you hard guarantees.

It’s already full concurrent and on the fly, so it won’t pause you


∃ ≠ ∀


A few important, production C++ codebases do use tracing mark/sweep GC.

Most famously: Chrome does (Oilpan), GCC does (or did), Unreal does (for core game state heaps), I think WebKit also does.


Except if they happen to work with .NET, Unreal, V8, COM/WinRT,...


Those using Managed C++, C++/CLI, Unreal C++, the group of WG21 folks that voted C++11 GC into the standard, or targeting WebAssembly (which runs on a managed runtime for all practical purposes).

Windows developers using COM, and WinRT, Apple developers using IO and Driver Kit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: