News for hackers. Stuff that matters.
Re:Organizations Using the D Language by WalterBright on Tuesday February 16, 2021 @06:42PM (#26160371)
To make it effective, you'd only want it to apply to GC pointers. But the type system does not distinguish between GC pointers and other pointers, making such a mode a rather complex implementation problem.
Re:Organizations Using the D Language by moonchild on Tuesday February 16, 2021 @10:34PM (#26162329)
In java-like situations where something like that would see use, I think it would be fair to treat all pointers as gc pointers.
Re:Organizations Using the D Language by WalterBright on Tuesday February 16, 2021 @10:40PM (#26162362)
In Java, all pointers are GC pointers. But in D, not very many are. For example, objects on the stack aren't GC pointers.
Re:Organizations Using the D Language by moonchild on Wednesday February 17, 2021 @12:45AM (#26163138)
Objects on the stack aren't pointers at all...
Re:Organizations Using the D Language by WalterBright on Wednesday February 17, 2021 @02:01AM (#26163529)
If you have a struct on the stack, and call member functions, you've got pointers. For an array on the stack, taking a slice of it or looping through it with pointers, you've got pointers. For a variable on the stack, passing it by ref to another function, there are pointers.