D2 port of Sociomantic CDGC available for early experiments

Regan Heath via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Oct 16 07:05:52 PDT 2014


On Thu, 16 Oct 2014 09:10:38 +0100, Dylan Knutson <tcdknutson at gmail.com>  
wrote:

>
>>
>> Wouldn't it be more generally useful to have another function like  
>> main() called init() which if present (optional) is called  
>> before/during initialisation.  It would be passed the command line  
>> arguments.  Then a program can chose to implement it, and can use it to  
>> configure the GC in any manner it likes.
>>
>> Seems like this could be generally useful in addition to solving this  
>> issue.
>
> Isn't this what module constructors are for? As for passed in  
> parameters, I'm sure there's a cross platform way to retrieve them  
> without bring passed them directly, ala how Rust does it.

Provided module constructors occur early enough in the process I guess  
this would work.  You would need to ensure the module constructor doing  
the GC configuration occurred first too I guess.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d-announce mailing list