rintolang / rinto

In-development open source programming language based on C/C++
https://rintolang.github.io
GNU General Public License v3.0
3 stars 2 forks source link

Garbage collection #12

Closed rohan221102 closed 2 years ago

rohan221102 commented 2 years ago

Garbage collection implementation for rinto!! This is the idea that I have for the implementation.

Garbage collection is enabled by default, but can be disabled in the header with

#garbage -disabled

What do you think about this approach! I feel like doing it the other way around would make it inconvenient for people initially starting out with the language.

zeim839 commented 2 years ago

The first few versions of rinto are unlikely to have dynamic memory allocation, so garbage collection wont be needed (at least in the foreseable future). I'm also not sure whether toggling garbage collection on/off would even be feasible.

That said, I'm still open to implementing the idea in the future. We should make some sort of todo list (maybe a pinned discussion issue?) to keep track of ideas.