View Single Post
  #189   Report Post  
Posted to uk.d-i-y
brass monkey brass monkey is offline
external usenet poster
 
Posts: 1,146
Default Windows 7 32 or 64 bit ?


"The Natural Philosopher" wrote in message
...
John Rumm wrote:
On 16/04/2012 21:50, The Natural Philosopher wrote:
John Rumm wrote:
On 16/04/2012 16:34, The Natural Philosopher wrote:
Robin wrote:
VB (and BBC Basic) have procedual and loop statements, that if used
properly negate the need to scatter GOTO statements around the
source. I can write a program in VB that would be structured
identically in C (or whatever) just replacing little bits. No
references to line numbers required.


Does the use of GOTO matter much - or at all - with modern compilers?

I ask as I thought that modern compilers broke stuff down into
control
structures so they didn't care if you used goto or cleverer stuff.
But
pl bear in mind that for me "modern" is anything after the mid-70s ;(

GOTO is a valid construct. The problem is when you uses it top produce
spaghetti code.


Any IF...THEN...ELSE... will compile dowmn to at least one
unconditional
jump.

C supports not only 'goto' but 'break' and 'continue' which are
specialised versions of the same thing.


As well as setjmp() and longjmp() which are even more flagrant abusers
of structure.

But thunderingly useful when you are 40 subroutines deep and the
hardware says 'er...I just lost carrier' and you want to simply abort
everything and start over ...without returning the same error code up
thorough the 40 subroutines.

Indeed, although these days one would argue that's what proper
exception handling is for...


and how else is that to be arranged?


I mean in the specific sense of languages that actually have exception
handling constructs built in, to support throwing and catching exceptions
and all that entails[1], rather than just the generic sense of how you
handle things programatically when the world does not go the way one
would like.

[1] Like automatically invoking destructors on the hierarchy of objects
up the call chain (even when some of those methods are late bound virtual
methods that may have not even existed when the exception handling was
originally written), making sure "finally" blocks are executed, that the
stack is tidied up, exception objects are caught in places able to handle
them, and their payload can be used etc...

Some of these requirements are specific in nature to OO designs, and
hence benefit greatly from specific capabilities added the languages
designed to handle the complexities introduced.


well I bet whoever wrote the compiler used some pretty arcane components
then :-)


I'll bet our roddy has a few things to say about this.
LMFAO.
uk.d-i-y awaits (with baited breath) our bull****ter of the year.
The stage is yours, rodders.