On Friday, 14 November 2014 at 01:05:13 UTC, Walter Bright wrote:
On 11/11/2014 6:34 PM, deadalnix wrote:
On an implementation level, a call to a pure function that
return an owned could
look like this :
{
IslandID __saved = gc_switch_new_island();
scope(exit) gc_restore_island(__saved);
call_pure_function();
}
This allow us to rely much less on the GC and allow for a
better GC implementation.
If that wrapper is automatically generated by the compiler, so
the user doesn't have to mess with it, it could be workable.
Yes, that is the intention. It means that my proposal does
increase moderately the complexity of the language, but increase
the complexity of the runtime (most specifically the GC)
significantly.