Add examples collection of small programs showing how to use GC for varioues features and with different configurations
plajjan opened this issue · 2 comments
I'd like to suggest the addition of a collection of small programs that show how the GC can be used, e.g. in a examples/
directory. I think the primary point of the example programs is to be as simple as possible as to explain a particular concept.
The test suite is the closest thing we have to examples today but it is riddled with preprocessor conditions and defines which can make it difficult to read and gctest tests many many things, again making it hard to take in a particular concept.
I don't think it is possible to maintain a comprehensive set of example programs, i.e. having examples that demonstrate all aspects of the GC. But I do think it is possible to maintain a reasonable set of programs that demonstrate some common use cases. The addition of new examples can be entirely best-effort.
In order to maintain relevance, the example collection should be tested in CI though, to ensure it is working.
Okay. Please let me know how do you think it should be (I think a draft PR with a single sample would be enough to explain the proposed architecture).
I think the samples should be treated as small tests (and be a part of make check
).