Does D have too many features?

q66 quaker66 at gmail.com
Sat Apr 28 14:21:52 PDT 2012


On Saturday, 28 April 2012 at 21:19:00 UTC, H. S. Teoh wrote:
> On Sat, Apr 28, 2012 at 10:07:54PM +0200, q66 wrote:
>> On Saturday, 28 April 2012 at 20:04:11 UTC, Walter Bright 
>> wrote:
>> >On 4/28/2012 1:00 PM, bearophile wrote:
>> >>"Phobos is too fat"
>> >
>> >As opposed to Phobos being phat?
>> 
>> Well my concern is so that it doesn't end up like Python 
>> standard
>> library, half-bitrotting and half-crap :) Huge standard 
>> library is
>> not a good idea even for a very big language/library team, and 
>> D
>> doesn't have one.
>
> On the contrary, being able to do stuff without having to 
> reinvent the
> square wheel every single time is a big plus.
>
> I used to have a strong NIH attitude -- years ago during my DOS 
> days, I
> reimplemented video output routines in assembly because I 
> wanted to use
> protected mode in DOS. Nothing in the C standard library worked 
> because
> they are all tied to DOS or otherwise do stuff that breaks in 
> protected
> mode. So I reinvented file abstractions, string processing, 
> etc., in my
> own library. I was rather proud of it too: my video routines 
> took
> advantage of features of my particular chosen video mode, so I 
> could use
> the i386's built-in loop instructions and other such things to 
> output
> characters really fast.
>
> In retrospect, it was a fun and very educational experience. 
> But to be
> frank, you can only reinvent the C standard library so many 
> times before
> you get totally sick and tired of it. I mean, I've implemented 
> linked
> lists, hand-made lexers, parsers, etc., who knows how many 
> times, and
> nowadays the thought of having to do it all over again just 
> makes me
> feel, "I should be doing better things with my time".
>
> The whole point of a standard library is that if somebody has 
> written
> that code before, and it's general enough for everyday use, 
> then you
> shouldn't need to download this, install that, configure the 
> other,
> before you can use it. It's a major plus if you're publishing 
> code to be
> able to say, just download my sources and compile it with the 
> language
> standard library and it will all work. As opposed to, if you 
> want to
> compile my code, you need library X and Y which depend on W and 
> Z, all
> of which have to be downloaded from different places all over 
> the 'net
> and you better make sure you get the right versions otherwise 
> everything
> will break.
>
> Besides, the whole point of a library is that only what you 
> need is
> actually linked in. You don't walk around carrying every book 
> from your
> bookshelf just because you *might* need to refer to one of them 
> on some
> rare occasion. But the library itself doesn't need to be 
> minimal, in
> fact, rather to the contrary. (That's why it's called a 
> "library".)
>
>
> T

Well I'm not obviously saying the features should disappear, what 
I had in mind was some kind of distribution system for small 
packages, kinda like luaforge or CPAN, where everyone could find 
what they need for their project. But keep Phobos itself small.


More information about the Digitalmars-d mailing list