digitalmars.D - Re: Revamped concurrency API
- bearophile <bearophileHUGS lycos.com> Oct 15 2009
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Oct 15 2009
- Bill Baxter <wbaxter gmail.com> Oct 15 2009
- Chris Nicholson-Sauls <ibisbasenji gmail.com> Oct 15 2009
- Fawzi Mohamed <fmohamed mac.com> Oct 15 2009
- Tim Matthews <tim.matthews7 gmail.com> Oct 20 2009
Bartosz Milewski:With every release of D we are narrowing our options. After D2 and TDPL, backward compatibility will become a major thing, so every ad-hoc feature in D2 will have to be carried over.<
D is a bit compatible with the C language, but one of the main selling points of D (D1, D2, D3...) is its newer and cleaned up nature. So I think D3 will break compatibility with frozen-D2 in many places, trying to fix the design errors of D2. D3 will not have a quick release schedule, I think it will try to learn from D2 and D1 in a more thought-out way, because D2 will be an essentially complete language, so the purpose of D3 will be mostly to improve things replacing features with better ones that do similar things :-) For example in D3 the switch may use three ... points as in the GCC extension, and so on. In the meantime people will often use D1 (until LDC becomes a good D2 compiler). Bye, bearophile
Oct 15 2009
bearophile wrote:Bartosz Milewski:With every release of D we are narrowing our options. After D2 and TDPL, backward compatibility will become a major thing, so every ad-hoc feature in D2 will have to be carried over.<
D is a bit compatible with the C language, but one of the main selling points of D (D1, D2, D3...) is its newer and cleaned up nature. So I think D3 will break compatibility with frozen-D2 in many places, trying to fix the design errors of D2. D3 will not have a quick release schedule, I think it will try to learn from D2 and D1 in a more thought-out way, because D2 will be an essentially complete language, so the purpose of D3 will be mostly to improve things replacing features with better ones that do similar things :-) For example in D3 the switch may use three ... points as in the GCC extension, and so on. In the meantime people will often use D1 (until LDC becomes a good D2 compiler). Bye, bearophile
Speaking of switch, I have tried to convince Walter to require either a break; or a goto case xxx; at the end of each snippet inside a switch. I was surprised by his answer: "but I use fall through all the time!" :o) I personally think requiring a goto case xxx; is more robust in presence of code maintenance because its semantics is invariant to code moves. Andrei
Oct 15 2009
On Thu, Oct 15, 2009 at 12:47 PM, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:bearophile wrote:Bartosz Milewski:With every release of D we are narrowing our options. After D2 and TDPL, backward compatibility will become a major thing, so every ad-hoc feature in D2 will have to be carried over.<
D is a bit compatible with the C language, but one of the main selling points of D (D1, D2, D3...) is its newer and cleaned up nature. So I think D3 will break compatibility with frozen-D2 in many places, trying to fix the design errors of D2. D3 will not have a quick release schedule, I think it will try to learn from D2 and D1 in a more thought-out way, because D2 will be an essentially complete language, so the purpose of D3 will be mostly to improve things replacing features with better ones that do similar things :-) For example in D3 the switch may use three ... points as in the GCC extension, and so on. In the meantime people will often use D1 (until LDC becomes a good D2 compiler). Bye, bearophile
Speaking of switch, I have tried to convince Walter to require either a break; or a goto case xxx; at the end of each snippet inside a switch. I was surprised by his answer: "but I use fall through all the time!" :o)
But only if there's _some_ statement in between cases, right? case 1: case 3: break; should still be allowed.I personally think requiring a goto case xxx; is more robust in presence of code maintenance because its semantics is invariant to code moves.
Agreed. --bb
Oct 15 2009
Bill Baxter wrote:case 1: case 3: break; should still be allowed. --bb
Or replace with: case 1, 3: break; -- Chris Nicholson-Sauls
Oct 15 2009
On 2009-10-15 21:47:05 +0200, Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> said:Speaking of switch, I have tried to convince Walter to require either a break; or a goto case xxx; at the end of each snippet inside a switch. I was surprised by his answer: "but I use fall through all the time!" :o)
that shows that he unrolls loops ;) basically the only case I know where fall through is really useful Fawzi
Oct 15 2009
Andrei Alexandrescu wrote:Speaking of switch, I have tried to convince Walter to require either a break; or a goto case xxx; at the end of each snippet inside a switch. I was surprised by his answer: "but I use fall through all the time!" :o) I personally think requiring a goto case xxx; is more robust in presence of code maintenance because its semantics is invariant to code moves. Andrei
First of all goto case is without a doubt safer and more robust but please leave as much of D as possible to remain compatible with C. Since D has objects a lot of code can be polymorphic through the classes/interfaces that C didn't have. C's design is trust the programmer, provide full power. It is unsafe agreed but by design. Breaking compatibility between D1, D2 etc may be an issue but if you loose the C then you lose what defines D.
Oct 20 2009