3 ms·
Front page doesn't say whether it has obligate GC, which nowadays I guess means yes.
by ncmncm 6y ago
Front page doesn't say whether it has obligate GC, which nowadays I guess means yes.
- KineticLensman 6y agoThis did make me curious. I couldn't find any explicit discussion of memory management, not even in the constructor section of the programming manual [0]. There isn't a section on destructors. I also searched for and didn't find 'garbage' and 'deallocation' and other similar terms. [0] https://github.com/ELENA-LANG/elena-lang/wiki/ELENA-Programming-Manual#constructors https://github.com/ELENA-LANG/elena-lang/wiki/ELENA-Programm...
- arakov 6y agoI can't imagine a modern language without GC. So yes, it has. Destructors are not yet implemented,though I do plan them.
- ncmncm 6y agoI can. Do you consider Rust not modern? Destructors are usually hard to support cleanly in the presence of obligate GC. Given destructors, GC turns out to be unnecessary. Lacking destructors, managing non-memory resources becomes foolishly difficult, particularly across library boundaries.
- arakov 6y agoas much as I can see, Rust is a special case. So I mean most of the modern languages. After all I consider C++ modern as well :)
- ncmncm 6y agoOK then! I will be interested to see how destructors are reconciled with GC. Where I have seen GC used in C++ runtimes, it is confined to specific, graph-like structures, where tracking cycles would be messy; or provided to obligate-GC languages being interpreted. In both cases it is always clear whether an object's lifetime is tracked, and the C++ runtime does not see the objects.
- arakov 6y agoI know there are problems with destructors. That's why I didn't implement them yet. But in C# they do exist. And after all you may always use explicit finalizers. I don't think that it makes the concept of obligate-GC invalid. But after all I don't care much. I'm more interested in other parts of language designs :)