Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Oracle matters less thank you'd think (Score 2) 157

There is one good use for goto that I've seen. It's for when you have to use a loop, and you want an action to occur if an item was not found. In C or C++, you can do this with...

for ( /* for loop */ ) {
    if ( /* condition */ ) {
        /* do something with found item (maybe) */
        goto finish;

// perform action when not found
// continue

With Java, this has to be done with an extra boolean to keep track (and it's much uglier).

bool found = false;
for ( /* for loop */ ) {
    if ( /* condition */ ) {
        found = true;

if (!found) {

Don't mistake this for saying something positive about goto though. Python one-ups both of them (and I wish this gets adopted in more languages).

for x in xrange(10):
    if x == 12:
    print '12 wasn't found between 0 and 9, weird'

Much better. Conveys your intentions much more clearly than the other two. This, and the inclusion of labeled break/continue's (as seen in D) would completely replace any need for goto.

Comment SourceForge is awful (Score 1, Insightful) 203

SourceForge is an awful interface for development. The only reason to go to SourceForge for Linux users is if the project is new enough that you need to download the source and compile it yourself. I've seen more and more new projects moving to GitHub or BitBucket instead of SourceForge. SourceForge's user interface, bug tracker, wiki software, is kind of awful. The newest development isn't happening on SourceForge, it's on GitHub.

The projects still on SourceForge started there when SourceForge was where to go. They're all old enough that they're mature and in the package managers.

Comment How is this Java-like? (Score 1) 219

I'm looking at a couple of the examples, and this looks far more Perl-like than Java-like. I can see some things that look like they were inspired by Java in the syntax (mostly the interfaces), but the print syntax is definitely more in line with how Perl works.

It also has a free "main" function, which is C/C++/D-like and isn't Java-like in anyway whatsoever. There looks like there's either dynamic typing or type inference (I'm guessing a combination of the two personally) which is C++11/C#/D/.

Also, I'm not sure how a VM has anything to do with being Java-like. A VM is pretty much a staple of any interpreted language. Your code is always running on a machine. If it's not running native code, it's running on a VM interpreting bytecode (which may JIT sections to bytecode, the distinction between VM and native code is becoming smaller every day).

Strange definition of "ominous" being used there. This sounds like an amazing leap for web development.

Comment Re:Rent-a-cop oversteps his bounds in shock horror (Score 3, Interesting) 566

As fun as it is to make fun of the rent-a-cop overstepping his bounds (which he did), the summary is a bit misleading. The quote is more about honor than anti-violence. Mal was just saying that he won't kill somebody in their sleep and the only way he will kill is if his opponent has a fair chance. Mal is in no way against violence (although he doesn't like trouble, which violence usually brings. So he tries to avoid combat if he can). The quote was in no way about "not killing people", neither in nor out of context.

Slashdot Top Deals

"The eleventh commandment was `Thou Shalt Compute' or `Thou Shalt Not Compute' -- I forget which." -- Epigrams in Programming, ACM SIGPLAN Sept. 1982