News for hackers. Stuff that matters.
Re:The Sparkling Programming Language by any1 on Monday November 16, 2015 @01:31PM (#10576105)
Does it have GC? Or does it perhaps use reference counting? Can it detect cyclic references?
Re:The Sparkling Programming Language by sdegutis on Monday November 16, 2015 @02:04PM (#10576347)
The readme seems to suggest it uses reference counting and doesn't do anything special about reference cycles:

> Another thing is garbage collection. It seems to be the silver bullet of automatic memory management when it comes to scripting languages, but it has some definitive, serious downsides. Non-deterministic behavior is one, speed is two, memory overhead is three, the difficulty of a decent implementation is four. Reference counting is a simpler approach that is more lightweight, easier to implement, completely deterministic and it has no memory allocation overhead (a program uses only as much memory as needed). Refcounting has its disadvantages too (e. g. memory leaks caused by cyclic references), but I believe that its good properties outweigh them.

Re:The Sparkling Programming Language by H2CO3 on Monday November 16, 2015 @02:40PM (#10576623)
Exactly, Sparkling uses reference counting, and one of the major TODOs is the introduction of weak references in order to address the issue of cycles.
Re:The Sparkling Programming Language by sdegutis on Monday November 16, 2015 @03:57PM (#10577109)
Implementing weak references sounds like a feature that will make the language's source code much more complex than the simplicity emphasized in your goals.
Re:The Sparkling Programming Language by any1 on Monday November 16, 2015 @05:45PM (#10577846)
nim has some sort of automatic cycle detection. You might want to look into how they do it. It doesn't hurt to check it out.
Re:The Sparkling Programming Language by any1 on Monday November 16, 2015 @05:37PM (#10577798)
Excellent! I was hoping that the answer would be that there is no GC.
Re:The Sparkling Programming Language by wofo on Monday November 16, 2015 @02:37PM (#10576595)
How is reference counting deterministic in a multi-threaded environment?
Re:The Sparkling Programming Language by H2CO3 on Monday November 16, 2015 @03:19PM (#10576870)
in the sense that an object is deallocated as soon as all pointers to it cease to exist.