On processors for D

Fredrik Olsson peylow at treyst.se
Fri Apr 7 00:54:56 PDT 2006


Walter Bright skrev:
> Georg Wrede wrote:
>> I admit this is a "feelings based" thing with most people I've talked 
>> with. It seems that on embedded platforms, many expect to write all 
>> the needed code themselves. It's also felt (possibly unduely??) that 
>> Phobos (or whatever general Win+*nix standard library) is mostly 
>> useless in embedded applications.
> 
> I'd like to get to the bottom of this feeling. For example, Kris was 
> unhappy that typeinfo imported std.strings. I can't figure out what the 
> problem with that is.
> 
I think it is the perceived bloat, not what is in practice done. 
Importing std.string while only using a single function still gives the 
impression of needing the whole module.


Perhaps having a module scope of hmm... sys where typeinfo, object and 
anything needed by compiler, and runtime resides is a good idea. Totally 
forbid anything in "sys" to import/depend on anything from the outside. 
That way there would be no question for anyone about "how much is safe 
to strip"?

And besides, is it wise to depend on what a linker "should do"? If 
current build chain nicely throws out what is not needed, does that make 
it right to assume that all build chains should behave as such?


As I see it each module in std should be as self contained as ever 
possible. I know the std.date I proposed imports std.conv, std.stdio, 
std.string and std.c.time, but my intent is to not import any of them 
when finished.

But then my intention was never to bring up the internals to much 
debate, I wanted to have input on the externals, how you as developers 
use the code. That was perhaps futile, but I still think my approach of 
a few but flexible, and overloaded functions is the best approach.


// Fredrik



More information about the Digitalmars-d-announce mailing list