* Posts by David Hancock

2 publicly visible posts • joined 4 Dec 2007

Microsoft heralds 'record' prison terms for Chinese pirates

David Hancock

High Quality ???1?!?1!!???!

>> “...high quality counterfeit Microsoft software...”.

So the counterfeiters are actually fixing the software? Marvellous! Anyone got a .torrent link?

Bloody code!

David Hancock

@Rich (re "Challenge" by Juha-Matti Myllylä )

I suspect you have somewhat missed the point in this example. The early return from the function is an optimisation. Once you've determined the result of a function, it is most efficient to exit the function immediately. Why bother continuing the iterations?

If UNIVERSE_[X|Y|Z]_SIZE were say, 20 trillion, and the locations of the target points were uniformly distributed, you'd be spunking a approximately 45 bajillion iterations just to avoid the ignomy of having 2 return points from your function.

This is a perfect example of why early return from a function is sometimes safe and desirable.