On Sun, Feb 5, 2012 at 2:13 PM, Andrei Alexandrescu <[email protected]> wrote: > On 2/5/12 9:57 AM, Jose Armando Garcia wrote: >> >> On Sun, Feb 5, 2012 at 1:44 PM, Timon Gehr<[email protected]> wrote: >>> >>> immutable variable = (boolean_condition) ? { >>> // initialize based on boolean_condition being true >>> }():{ >>> // initialize based on boolean_condition being false >>> }(); >>> >>> >> >> Cool, now I want some syntactic sugar ;). I write this all the time! > > > Make it a function. >
I agree that in theory that you can do all this stuff in D but the reality is that developers are lazy and end up fighting the language. It is probably true that in a well structure/abstracted program this is not a problem but the reality is that a lot programs don't start this way. I listen a very enlightening talk by Gilad Bracha the other day: https://www.youtube.com/watch?v=-IavVtOE_Fg. I still not ready to completely agree with him but I do see his point about a language getting out a programers way... -Jose > Andrei
