Re: Software Architecture/Design

James Milne <[email protected]> Wed, 16 Jun 2010 12:56:37 +0100
Newsgroups gmane.games.devel.sweng
Message-ID <[email protected]>
On 15 Jun 2010, at 19:49, Mat Noguchi wrote:
>> From: [email protected] [mailto:[email protected]] On Behalf Of Jon Watte
>> Sent: Tuesday, June 15, 2010 11:21 AM
>> To: [email protected]
>> Subject: Re: [Sweng-Gamedev] Software Architecture/Design
>>  
>>  If you could get most people to
>> agree on a C++ GC then the engineering situation might become viable
>> there
>>  
>>  
>> If only the C++ standards committee would agree on a static reflection API that would make precise GC possible, that might actually happen.
>>  
>> That C++ *still*, 25 years later, doesn't have the basic ability to get the list of members of a type is beyond cruel to my mind.
> Which was basically my point: in order to implement precice GC, you need enough information that would be beneficial outside of just doing GC.

I think this is becoming feasible with compilers like LLVM. GCC also has a plugin API now, which would give one the opportunity to insert a data emitter at the appropriate point in the compilation pipeline. 

This data could then probably be linked into your final executable as an extra section, and read at runtime. Thus making it useful for GC (no more bugs introduced by forgetting to mark references), serialisation, runtime introspection, signals/slots systems, etc.

I think it's not so much that C++ that is the problem, rather that compilers have been too much of a black box, hiding all that juicy information from us, forcing us to come up with crummy ways of recreating it.

James

_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com