Why typedef's shouldn't have been removed :(

mta`chrono chrono at mta-international.net
Wed May 9 08:27:47 PDT 2012


Am 09.05.2012 11:53, schrieb Jonathan M Davis:
> On Wednesday, May 09, 2012 10:00:37 mta`chrono wrote:
>>>> Maybe it's not directly related to this topic, but shouldn't that be
>>>> rather part of druntime?
>>>
>>> Only if something else in druntime needs it, which it doesn't.
>>>
>>> - Jonathan M Davis
>>
>> There is a real trend to purify the language. I also think it's the
>> right decision to replace compiler intrinsics / language feature with
>> their library counterparts. Moving stuff to phobos is fine as long as
>> you use phobos. But I'm using tango and druntime. I haven't even
>> installed phobos on my system. The same impacts deimos. People tend to
>> create unneccessary phobos dependencys.
> 
> In general, we're not sticking anything in druntime unless it needs to be 
> there. It's also pretty much expected that projects will use Phobos. druntime 
> isn't even provided at a separate library when distributed with dmd. If you're 
> specifically trying to avoid using Phobos, you can do that, but don't expect 
> stuff that doesn't need to be in druntime to be put into druntime just because 
> you don't want to use D's standard library.
> 
> Since Phobos is statically linked at this point, the parts that you don't use 
> wouldn't be pulled in anyway. But you can also copy it from Phobos and put it 
> in your project if you want to (as long as it doesn't have a lot of other 
> dependencies in Phobos).

It's nothing more than a general design decision what belongs into
druntime and what doesn't. I don't expect you to do anything just
because I say so (Don't believe me!), but since this newsgroup is open
for everybody to post his/her crap, I'll do similar. ;-)

The question I had to came is across is "What is druntime?". It provides
D's _meat and potatoes_ used for _fundamental_ features of the language
like garbage collecting, threads, synchronisation and it's even used for
array manipulation. Coding D without druntime is not possible.

Sooner or later dmd will be able to support ARM android or iOS. And then
we'll be lucky to only port druntime to the new plattform. Phobos is a
really powerfull library but it's too fat with all it's dependencies.
(libcurl is one of it).

The reason why C is so powerfull and runs even on a tiny 1,59 €uro AVR
processor is quite simple. It's _NOT_ too much coupled to any standard
library. There are hundreads glibc, uClibc, bionic, diet libc. just to
mention a few.

> Personally, I don't know how you could get by without using Phobos for at 
> least std.traits unless you avoid templates (which would _really_ be reducing 
> D's power - I'd hate to use D without templates), since it's a _lot_ harder to 
> have good template constraints without std.traits.

That's how I do for now: Copying std.traits to tango.core.Traits. It
works quite fine unless you start using tango and phobos side by side in
a "hybrid" project. That's why I prefer a common core.traits.

> 
> - Jonathan M Davis

Okay, now you got my 50 Cents. Thanks for reading.


More information about the Digitalmars-d mailing list