Re:Baby's First Garbage Collector
by pjmlp on Monday December 09, 2013 @02:54AM
(#6873282)
> I don't know of any language that has pointers and a GC. Are there any? C# lets you use pointers but only if you tell the GC to not move your object and promise to behave
Oberon, Oberon-2 allows you to use no-GC pointers via the SYSTEM package.
Active Oberon additionally adds syntax support for untraced pointers.
Modula-3 has unsafe modules which allow you to use untraced pointers.
D has unsafe pointers in system blocks.
Ada and C++11 have support for optional GC defined on the language standard. However so far, there isn't any compiler vendor that really offers them.
In Java you can do a bit of dirty pointer tricks via the com.sun.unsafe package, but it is Oracle's VM specific. Although there are plans to make it part of the official library after Java 8.
Oberon, Oberon-2 allows you to use no-GC pointers via the SYSTEM package.
Active Oberon additionally adds syntax support for untraced pointers.
Modula-3 has unsafe modules which allow you to use untraced pointers.
D has unsafe pointers in system blocks.
Ada and C++11 have support for optional GC defined on the language standard. However so far, there isn't any compiler vendor that really offers them.
In Java you can do a bit of dirty pointer tricks via the com.sun.unsafe package, but it is Oracle's VM specific. Although there are plans to make it part of the official library after Java 8.