I work for myself. If I had to hire elite JavaScript programmers that
insist on not using goto I would be out of business.
Yet several of my JavaScript programs are practical and solve very
complicated linear programming models in the electrical field where I
am an expert.
I want a goto statement, because it would make my programming life
easier. I like to spend my time on subject issues, not programming
issues.
Ive just got to chime in here. Im also a self taught programmer (for
the past 12 years), and I also used to be an electrician (which turned
out to be a huge benefit when it comes to debugging and QA, by the
way).
At first I had no small amount of sympathy for you, in the calculator
thread; you ran head first into a bunch of egos. But now you come back
for more, and Im not sure why you expected anything different, unless
thats what youre looking for...
The thing is, a programming language is just a tool like any other; a
hammer, an EMT/Rigid bender, the law, a fork, spoken languages, shoe
horns...all tools. Which tool you use and how you use it depends on
what it is you want to do.
As was allready pointed out, goto is not used much anymore because of
the problems that arise when it is abused. I know you work relatively
alone and run a small site, but the reality is its not with programmers
like you in mind that language features are decided upon. The vast
majority of software is developed by groups and teams of developers,
many of whom never see each other, so features that tend to be abused
and thus make a language unreadable by anyone coming along later
usually get frowned upon. With the advent of the web, scalability is
also a huge concern; your app may run fine on the desktop with one
user, but collapse when 200k people all access it at once.
Havent you ever gone into a panel and wondered "What the hell was this
moron doing? Its going to take me forever to straighten this out" as
you look at the 220 feeds and dont see brown yellow or orange anywhere?
Kinda like that. Doesnt it piss you off when the guys who did the new
construction obviously didnt give a rats ass about the guys who had to
come along and make repairs/maintain things later on? (Can you say
Union Labor?)
If you had to run, oh, half inch EMT from one side of a room to
another, the walls being 10 feet apart - you cant go accross, only
around - that means two 90s...do you also complain that you have to put
a box in between? I mean, its only 20 feet, what a waste of your time,
right? But there are reasons ~why~ you have to put a box between, arent
there? What would you say to an impatient helper who said screw it and
bent and strapped the run with no box in the middle? (Id say YOU pull
the damn wire, then make him rip it out and put in the box). Also to
the point, why are you supposed to put a loop in the wire in the box?
Is it so you can do your job faster, or is it so the guys who open it
up later on can do theirs safer?
My long winded point is that there are many many priorities being
balanced in the evolution of any programming language. Its not all
about initial dev time, its about future maintenance time, scalability,
learning curve, etc etc etc. And languages ~do~ evolve; goto is just
proving to be unfit for survival. Personally I hate it with a passion,
but then Ive spent a lot of time in the past as a maintenance
programmer.
Its dissappearance is just Darwinism as far as Im
concerned.
This is another example of academia forcing us to use
useless non productive time to preserve some higher than
thou intellectual crap.
While Im not going to argue with you that those ducks are in the sky
oftentimes, in this case I think youre shooting the old man standing
next to you with a hellava lot of salt shot. Dont let youre anger at
the pomposity, self importance and pretension you find here prompt you
to write code that in the future may bite you in the ass.
Eric