Earlier quoted context omitted.
> An empty try block allows us to repeat variable declarations with the same name in a long stretch of scripty-style code. Either I'm missing something here, or this is really as bad as it sounds. I understand you want nested scopes that end before the method's scope ends, but cannot for the life of me think of a defensible code example. Why not just make them into methods?
In C++ block is often a way to ensure automatic variable destruction. This is important, because in C++ often there is important stuff going on in destructor. For example in RAII idiom. Example: ... ... { //critical section QMutexLocker locksInConstructorAndUnlocksInDestructor(&mutex); a = doStuff(a,b,c); b = doOtherStuff(a,b,c); c = andAnother(a,b,c); } .. .. It would be overkill to make this block a function, espec…
Re: Java 8 lambda syntax decided - same as C# and Scala
#81This is an accepted idiom in C++, but I don't think it makes much sense in Java, since there are no destructors.