Gotos definately do have a place in modern programming languages, according to one of the most influential software dev teachers, Steve McConnell (See http://www.stevemcconnell.com/ccgoto.htm ), and I agree. Obviously its avoidable, but may not always be the best choice.
Andrew Glowacki
Posts
-
Revenge of Redmond – C# and the .Net Frameworks -
The Real Windows 8 LogoI think the real humor comes from the fact that Microsoft actually paid a design firm to help them come up with the logo.
-
Text Based Progress IndicatorGoogle would be proud
-
Visual studio 2011 in browser ;)I agree there should be a VB version, it is a very cool tool. However this website disagrees with you on VB programmers: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^]
-
Coding on a treadmillIve always wanted to try it. I think it would also be cool if someone made a program where you talk your code into a mic. Someday...
-
while (true) and for (; ; ) [modified]Very good point, for some reason I always assume people are using .NET. I did mean C# anyway. However, nothing comes to mind for a concrete example of where this would be useful at the moment.
-
while (true) and for (; ; ) [modified]True. I guess having it just like this would be useless unless maybe doSomeOtherStuff actually used the same data in the critical section that other threads were using as well. In this case I would do something like this:
while (true)
{
lock(syncObject)
{
if (checkSomeCriticalCondition())
break;
doSomeOtherStuff();
}
Sleep(someAmountOfTime);
}... I can see a lot more holes in this design now but I still think that having a critical section check could be used somehow.
-
while (true) and for (; ; ) [modified]I know, just giving a solid example so there's no doubt. ;P
-
while (true) and for (; ; ) [modified]while(true) { lock(syncObject) { if (checkSomeCriticalCondition()) break; } doSomeOtherStuff(); }