Feature suggestion: in-place append to array

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Apr 1 08:05:14 PDT 2010


Mike S wrote:
> bearophile wrote:
>>> How difficult do you think that would be for the compiler devs to 
>>> implement in the semantic sense?  Assuming it can be done without 
>>> major hardship or compromising the design of the language, that would 
>>> be really cool.<
>>
>> They are easy to implement. Even the lazy ones. See ShedSkin "compiler".
> 
> I figured the eager ones wouldn't be a problem, but I wondered whether 
> the lazy ones might be a pain.  Guess not, so cool. :)
> 
>> We can talk about them again for D3. At the moment D2 needs less new 
>> features and better implementation/debugging of the already present 
>> features.
> 
> That's very true...I'm looking forward to Andrei's book, but I can't 
> imagine how he's finishing it on schedule, considering how quickly both 
> the language itself and the compiler are evolving.

The book is finished and is on schedule. It's been out of my hands for a 
while - currently in the final copyedit stage. (Walter, last chance to 
remove octal literals.) I'll publish a schedule on my website soon.

The entire genesis of TDPL and its growth in conjunction with the 
language itself, was a very interesting process (in addition to being a 
near-death experience) that I hope I'll find time to write an article 
about soon. Bottom line, the thing looks like a million 1920 bucks. I 
fail to see many ways in which the people involved could have made it 
better. That being said, it's entirely unpredictable how the book's 
going to fare. I'll be very curious.

> If the language 
> specification and reference compiler are both as incomplete, volatile, 
> and partially implemented as they are now, a June release might do some 
> real damage to D's reputation.

Not at all. Consider the state of C++, Perl, Java, or Ruby definitions 
and implementations at the time when their first "hello, world" book was 
printed. If anything, TDPL is slightly later, not earlier, than average. 
Even K&R's classic does not cover the entire language (even as it was 
defined back in the time) and has things like prototype-less calls, 
which C has since dropped like a bad habit.

> As far as D3 goes though:  Obviously nothing about it has really been 
> discussed at length, but is the general idea that it would be another 
> backwards-incompatible overhaul, or is the plan to make D2 the target 
> for backwards compatibility from here on out?

The incompatibility with D1 was a one-off thing. D2 is the flagship of D 
going forward. If you ask me, I predict that the schism of D2 from D1 
will go down as Walter's smartest gambit ever.


Andrei



More information about the Digitalmars-d mailing list