Hi,
> Personally, I reckon that it's the character of the coder that defines the
> readability of their code, not the inherent abilities of the language.
> Also, anyone who uses a goto in their code will always write spaghetti (:
It most definately is the character and inclinition of the writer that
determines the readability of the code.
on the 2.6.9 kernel, I searched for every instance of the word goto.
[EMAIL PROTECTED] linux-2.6.9]$ find . -name \*.c | xargs grep \ goto\ | wc -l
1308 instances.
Carefully written, gotos can make the code shorter, more succinct, and
more readable.
There are examples where goto helps.
There are examples where goto does not help.
Knowing the difference is the crucial thing. Just applying the rule,
"never use gotos" is unwise.
========================================================================
For reference, you might like to look at:
http://kerneltrap.org/node.php?id=553
Quoting::
There was a recent discussion on the lkml about the frequent use of "goto"
in Linux kernel code. Drawing perhaps on Edsger Dikjstra's 1968 paper
titled "Go To Statement Considered Harmful", the argument proposed that
using goto will only produce "spaghetti code". A more recent proponent of
this theory being Niklaus Wirth who developed Pascal circa 1970 and its
successor, Modula-2, in 1979. In the recent thread on the lkml it is made
quite clear that the use of goto in Linux kernel code is well thought out
and justified. One such explanation can be found within chapter 2 of
O'Reilly's excellent book, Linux Device Drivers. It is further explained
in the following thread by a number of kernel developers including Robert
Love [interview], Rik van Riel [interview], and Linux creator Linus
Torvalds.
Derek.
============================================================
On Wed, 24 Nov 2004, Steve Holdoway wrote:
> 'Whats the best language in the workd?'
> 'C'
> 'Why?'
> 'Because you can do anything with it'
>
> 'Whats the worst language in the workd?'
> 'C'
> 'Why?'
> 'Because you can do anything with it'
>
> Steve Holdoway, 1989.
>
> Personally, I reckon that it's the character of the coder that defines the
> readability of their code, not the inherent abilities of the language.
> Also, anyone who uses a goto in their code will always write spaghetti (:
>
> Me and Dijkstra agree on this one!
>
> Back to the OP, when's the next installfest? Will there be any facilities
> on 2/12? Can someone more knowledgeable of the facilities follow on this
> ne, please?
>
> As long as we have some idea of the performance of your (still
> functioning) computers, we can get you up and running. The fact that
> you're comfortable in DOS will be in your favour.
>
> Plenty of us are old g*ts, too!
>
> Cheers,
>
> Steve
> On Wed, November 24, 2004 3:50 pm, Rex Johnston said:
> > Carl Cerecke wrote:
> >> motivated wrote:
> >>
> >>> I'm currently learning Java and hope to move on to C++ as quick as
> >>> possible.
> >>
> >>
> >> Stick with Java. Avoid C++.
> >
> > I'd have to second that. C++ is overly complex and it's very easy to
> > make completely unreadable (read unmaintainable) code. Java misses out
> > on nasties like templates and operator overloading.
> >
> > Cheers, Rex
> >
>
>
>
--
Derek Smithies Ph.D. This PC runs pine on linux for
email
IndraNet Technologies Ltd. If you find a virus apparently
from me, it has
Email: [EMAIL PROTECTED] forged the e-mail headers on
someone else's machine
ph +64 3 365 6485 Please do not notify me when
(apparently) receiving a
Web: http://www.indranet-technologies.com/ windows virus from me......