On 14/09/16 16:49, Laeeth Isharc wrote:

In D code that I have read where people use RC types they have different
names making it quite clear - eg RCString.but


I find the suggestion that the compiler make code generation decisions based on type names not one I would gladly see happen.


If you're worrying about GC presumably you have a decent size problem
anyway (and I admire the ambition of weka in this respect).

Not everything a Weka employee says on this forum is about what Weka is doing.

How would you end up with a GC allocated struct by mistake (presuming
you think it through first) at the size you are at? 200k lines and 30
people is a lot,  but it's also not Windows scale.   And if you did,
and it mattered,  wouldn't you pick it up quickly with GC profiling?

We didn't end up with a struct that was allocated by mistake. In fact, I do not consider what we're doing to be a hybrid approach. More of a "use GC only when the language leaves us no other choice" approach, which is far from being the same.

With the hybrid approach, getting there is far from difficult.

struct SomeRCNonGCDataStructure {
}

...

class SomethingUseful {
   private SomeRCNonGCDataStructure dataStructure;
}

Unless you suggest that people implement each algorithm twice, having structs on the heap may be hard to avoid.

Shachar

Reply via email to