Simen kjaeraas: I think you have missed one important point: that was not my list of things I'd like in D2/D3. It contains some cute things, but it's first of all a summary of the linked stackoverflow thread. My personal list of desiderata for D3 is different.
> Absolutely. While it's possible today, some more sugar wouldn't hurt. I think Walter said this can't be implemented :) The items alignment of function arguments used by D tuples is not fitting to return a struct. I have not understood the details of this thing, and in the end I don't care if returning a struct can decrease performance a bit... > > in for arrays: > > Yes. I think Walter doesn't like this because he thinks "in" has to always look for keys, and keys of an array are its indexes. I don't agree with Walter here, but I don't think he will change his mind soon. > Neat. Worthy an @keyword, I think. "@flag enum foo {...}" It's cute. But Don hates attributes :-) Recently I have created a thread about this, and some one has written a good enough implementation in normal D code, that can be "good enough". > I feel this is a tad too sweet. On the one hand I like it, on the > other I feel it will lead to bugs at a later point, by hiding null > pointers and not teaching programmers to deal with them. > "Add a ? to all object accesses. It is magical and removes bugs." I agree. It can be handy but it can lead to bugs too, so I don't know what to think about it. > Given an event system, what are the advantages to language > support for this? I don't know. > > Exception grouping to avoid duplicating the same handling logic > > Very nice. I have proposed something similar time ago. Python uses a tuple of possible exceptions, I was not expecting D to allow only one of them. Some form of this can be added to D2. > > @memoize > > > > Or something similar user-defined. It is really useful, to avoid coding > > true dynamic programming algorithms. > > This again is to sweet for me. What does @memoize do? Does it > store the last 5 results? All results? The last result only? > Does it depend on the phase of the moon, time of day and what > socks I'm wearing? That's why I have said user-defined (in Python too it's user defined), so you can define and use the one you prefer. But currently D properties are not flexible enough to allow programmers to define them. > So "a as b" rather than "cast(b)(a)" or "to!(b)(a)"? Or is there > some other magic at work that I don't see? I think there is no magic, it's just syntax sugar. Bye, bearophile