Garbage Collection for Systems Programmers
Walter Bright
newshound2 at digitalmars.com
Tue Apr 9 16:54:03 UTC 2024
On 4/9/2024 6:50 AM, Dukc wrote:
> If the write gate would just ignore any pointers not registered to the GC
> it would probably continue to work with existing code with no changes other than
> a slight slowdown.
This appears to require that the language would be cognizant of two different
pointer types - gc pointers, and non-gc pointers. This concept was implemented
in Microsoft's "Managed C++" language.
It's still in use, but I never hear anyone mention it. The two-pointer-type
scheme is a massive increase in complexity that the programmer has to deal with.
For example,
int strcmp(char* s1, char* s2);
now requires 4 declarations (& means a GC pointer):
int strcmp(char* s1, char* s2);
int strcmp(char& s1, char* s2);
int strcmp(char* s1, char& s2);
int strcmp(char& s1, char& s2);
People dealt with multiple pointer types in the DOS 16 bit days, and I was very
glad to be able to get away from that.
More information about the Digitalmars-d
mailing list