Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 26 Jun 2004
Offline Last Active Apr 06 2015 10:03 PM

#4846917 To goto or not to goto?

Posted by sindisil on 09 August 2011 - 03:51 PM

I do a lot of C programming.

In C, goto is a good way to handle the cleanup code paths in a function, in much the same way that exceptions might be used in a language that supports exceptions.

Beyond that, goto is very rarely useful to break out of an inner loop.

The whole "never a goto" religion is rather sad. As with virtually any other language feature, they can be misused. Likewise, as with virtually any other language feature, they have their place.

#4806976 [java] JGO registration page captcha broken

Posted by sindisil on 05 May 2011 - 10:44 AM

I think I've seen folks here that are also active over on java-gaming.org, so hopefully someone will see this and let the board ops know that their registration page captcha is broken: no image is displayed. On the off chance it might work, I tried the speech version, but that's broken, as well.

#4766506 How many of you use C for game programming?

Posted by sindisil on 28 January 2011 - 11:08 PM

People only prefer C over C++ when they don't know how to write idiomatic C++ code.

That's simply not true. There are plenty of us who both know C++ well, and still prefer C. In my case, in fact, I think it's *because* I know C++ well that I prefer C.

I've been coding in C since the early 80s, and C++ since around 1989 or 1990. I develop professionally using both (as well as other languages), and I can and do use C++ in an "idiomatic" way, including RAII, use of the stdlib, etc.

I still very much prefer C over C++. In fact, it's not even close.

Sure, there are things that I like about C++ in theory, but in practice, C++ is such a muddled and overcomplicated mess that I'd rather just avoid it.

but trying to argue that C is somehow better in any situation other than a few niche domains is simply foolish ignorance or willful stupidity.

With all due respect, that's a rather simplistic and close minded attitude. They're tools, and, as such, suite individuals better or worse in turn.