March 30, 2005
> OK, it's good for built-in types. But can I extend it in such way, that
> expressions like writef("my class: ", my_class_instance) work as expected
> ? In
> C++ extensibility is a grate benefit of using cout instead of printf.

Structs cause problems, I believe. Everything else should work - though I don't particularly like the default toString for objects just giving the class name.


March 30, 2005
In article <d2egcc$1cfj$1@digitaldaemon.com>, Ben Hinkle says...
> 
>> OK, it's good for built-in types. But can I extend it in such way, that expressions like writef("my class: ", my_class_instance) work as expected ? In C++ extensibility is a grate benefit of using cout instead of printf.
> 
>Structs cause problems, I believe. Everything else should work - though I don't particularly like the default toString for objects just giving the class name.
> 
Yes, you are right. Using toString is a good solution. Thanks.


March 31, 2005
Vladimir wrote:
>>>I'm newbie in D. 
>>
>>You might want to check out the new digitalmars.D.learn newsgroup too ? 
> 
> Thanks for suggestion, I've just overlooked link to it. 
> 
> 
>>Linking between systems and versions is about as much as fun as in C++, 
> 
> Yes, but following some (restrictive and complicated) rules one can keep C++ library binary compitable. When this rules becomes too restrictive it's good time to redesign the library, which almost surely will break even source-level compatibility. 
> 
> 
>>so you might want to consider "extern(C)", and also no (external) GC... 
> 
> BTW, is GC somehow customizable ? Can I replace default GC by my own one ? 

"by my own one" - I think it depends how dirty you like to get your hands. ;)

Some people have worked using different GC's. For example: http://wxd.sourceforge.net/misc.html

More GC-related links are here: http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Garbage

-- 
jcc7
http://jcc_7.tripod.com/d/
1 2
Next ›   Last »