August 15, 2003
"Ilya Minkov" <midiclub@8ung.at> wrote in message news:bhj2s5$2tmc$1@digitaldaemon.com...
> Benji Smith wrote:
>
> > I agree. goto should either be taken out of the language or it should be able to accept an empty statement (without the kludges of requiring a semicolon or a zero).
>
> WAIT A MOMENT! What do you think an empty statement looks like? Either {} or ; but } is not an empty statement

An empty statement could be completely empty if control constructs always controlled blocks instead of statements.  ;)

>  From the parsing point of view, label would need to be a stetement all
> by itself, i don't know whether this imposes any problem. Or } should be
> interpreted as ;} which should work OK.

Yeah, you have the solution:  label is a form of statement, that generates no code, just a place marker.

> I just can't understand what's wrong about:
> ...
> jump_out: ;
> }

It sucks.  Too easy to forget the ';' -- and what is the purpose?  To annoy the programmer?

Sean


August 15, 2003
IMO, empty statement should not be allowed at all. We should uses a statement that has no effect or have a keyword "nop". That changes would also prevent bug like:

while (somecondition);
    do_something();

where there is an extra semicolon at the end of the first line...

And the keyword would also be usable in for loop (1st and 3rd expression).
The 2nd one should always be a condition (and we can uses true if we
do not want it), For example:

for (nop, true, nop)
{
}

In you case, you will have:

...
jump_out:
    nop;
}

This makes the code a bit clearer and less error prone...


IMO, I think that for switch statement, we should have no_break keyword when we want to fall-through.

break would be required except when one of these rules is verified:

- there is a break, a return, a throw, a no_break or a goto at the end of
the case.
- the case is empty (a group of similar cases). But in that case, maybe it
would be
better to be able to enumerate them (as in Pascal) and then we would never
need empty statement and we would not even allow them anywhere.


"Ilya Minkov" <midiclub@8ung.at> a écrit dans le message de news:bhj2s5$2tmc$1@digitaldaemon.com...
> Benji Smith wrote:
>
> > I agree. goto should either be taken out of the language or it should be able to accept an empty statement (without the kludges of requiring a semicolon or a zero).
>
> WAIT A MOMENT! What do you think an empty statement looks like? Either {} or ; but } is not an empty statement
>
>  From the parsing point of view, label would need to be a stetement all
> by itself, i don't know whether this imposes any problem. Or } should be
> interpreted as ;} which should work OK.
>
> I just can't understand what's wrong about:
> ...
> jump_out: ;
> }
>
>
> -eye/MIDICLUB
>


August 15, 2003
Sean L. Palmer wrote:

> Yeah, you have the solution:  label is a form of statement, that generates
> no code, just a place marker.

This may impose a problem with labelled loops?

-eye

August 15, 2003
Sean,
I don't care if people want to use goto. I don't think
it's the best of choices. Assembler uses the jump statement
because it does not have the facility of higher level
languages, and it is necessary. All branching logic
in higher level languages is implemented as jump statements
in the object code because that is the limit of
available control structures in object/machine code.

Sean L. Palmer wrote:
> It does.
> 
> The goto statement is the direct equivalent of the assembler jmp opcode, the
> most fundamental control transfer structure bar none.
> 
> Higher-level control constructs should be used when possible.  But goto
> exists to allow making of new control constructs (if we had some kind of
> macro facility, which we don't) and to get you out of pickles where the nice
> "high-level" control constructs don't work and aren't getting the job done.
> 
> Believe it or not, C does not provide all the control constructs you'll ever
> need, unless you count goto.
> 
> Sean
> 
> "Frank D. Wills" <fdwills@sandarh.com> wrote in message
> news:bhilbg$2hmo$1@digitaldaemon.com...
> 
>>Matthew Wilson wrote:
>>
>>>"Frank D. Wills" <fdwills@sandarh.com> wrote in message
>>>news:bhh9ic$1853$1@digitaldaemon.com...
>>>
>>>
>>>>I suppose the goto statement isn't a big issue, but it's the
>>>>first thing I would want to remove from all languages except
>>>>it's equivalent, the jump statement on assembler, where it's
>>>>needed. Otherwise nothing worse or uglier than a goto statement.
>>>
>>>
>>>Don't mean to offend, but this sounds terribly naive. Just because
> 
> something
> 
>>>is rightly deprecated in most circumstances does not mean it does not
> 
> have a
> 
>>>use. I rarely use it, probably a couple of times a year, but when I do
> 
> it is
> 
>>>the appropriate tool for the job in hand, so I use it.
>>>
>>
>>The use of a goto statement is a hack, a kludge-fix for
>>a lack of logic and structure. I hope that doesn't sound
>>too terribly naive.
> 
> 
> 

August 15, 2003
Ilya,

You really like to jump in there when there
is conflict, don't you? You enjoy fanning
the flames because you like to see conflict,
fighting, and discord. I've known people like
you. You like to see things and people torn
by discord and destruction. This is just what
I hope does not happen to this newsgroup and
project.

Considering all that Walter has put into this
effort, I do not think that it is a fitting
response to turn this group into a bunch of
bickering children.

I think calling me names, and degenerating
into personal attacks on me, just because I
express an opinion about an aspect common to
many languages is just the kind of thing that
will destroy the good spirit that has been
enjoyed in this newsgroup.

And again, I think it is a very poor thank-you
to Walter to cause the degeneration of this
newsgroup. As Walter said, it is the enthusiasm
of everyone for the work he is doing that
keeps him going. Maybe Walter didn't know
his supporters were just childern, prone to
bickering, fighting, and a lack of disipline.

I don't think we deserve what Walter is doing,
but he is doing it, and sharing it with us,
and I think we should do our best to not
destroy the good spirit that is behind what
Walter is doing.

Ilya Minkov wrote:
> Frank D. Wills wrote:
> 
>> Matthew Wilson wrote:
>>> If it's in, then its use should make sense.
> 
>> A lack of
>> education beyond highschool is legal. Does that
>> make a lack of further education sensible?
> 
> 
> For some poeple yes. Some people just feel better when they do routine jobs, then when they have to think.
> 
> You *are* naiive!
> 

August 15, 2003
> Considering all that Walter has put into this
> effort, I do not think that it is a fitting
> response to turn this group into a bunch of
> bickering children.

well said,

 and to misquote and paraphrase Walter, this is a programming language not a
religion

so lets have a nice clean fight and argue about the point (goto)
can we get to it without going to it ?
I'll break from here and let you continue .... (or was the redo which you
can't do!)
not meaning to throw an exception into the works.


August 15, 2003
Mike Wynn wrote:
>>Considering all that Walter has put into this
>>effort, I do not think that it is a fitting
>>response to turn this group into a bunch of
>>bickering children.
> 
> 
> well said,
> 
>  and to misquote and paraphrase Walter, this is a programming language not a
> religion
> 
> so lets have a nice clean fight and argue about the point (goto)
> can we get to it without going to it ?
> I'll break from here and let you continue .... (or was the redo which you
> can't do!)
> not meaning to throw an exception into the works.
> 
> 
Amen! (Opps! Switching to non-religeous mode...)
Great!

August 15, 2003
Matthew Wilson wrote:

> 
> Your analogy is not well founded. There are no circumstances under which a
> Big Mac is appropriate. Even if you do eat meat (though I cannot imagine
> anyone wishing to do so), then there are better forms of meat. Even if you
> do need a hamburgler, then there are less mass-produced, healthier, and
> (from what my carnivorous friends tell me) tastier alternatives.

Oh I can't resist...

Hamburger is definitely bad bad bad.  But there are some meats (like fish) that are very good for you.  This was a programming discussion, wasn't it? :)

> What we're talking about here is something that is almost always bad, but
> sometimes very good. A better analogy in this case would be a can of Coke.
> Bad in almost all conceivable circumstances, but if you've got a
> cycling-<substitute your sport of choice here, so long as it's not
> golf!>-headache, then the combination of water, high concentration of simple
> carbohydrates and big shot of caffeine are exactly appropriate. Rehydrates,
> gives your brain some well needed carbs, and opens up the blood vessels in
> the old grey matter to assuage the ache until the rehydration kicks in.
> Marvellous!

Well that's kind of accurate, but I'd say that my brain will not be the thing so starving for carbs.  It gets just as much as it needs.  As a runner, my legs will be grabbing all the sugars they can get first.  In fact, I'd say my brain goes into a minimal carb burn state on long runs -- zombie style. Caffeine does help for endurance, I here.

Although, if you ever run, you'll NEVER want to have a carbonated drink.  The...um... "air bubbles" really get in the way of breathing -- really.
Drink juice instead.

Otherwise the coke analogy sounded more like a euphemism for a bad habit ;).  I still have trouble believing the volatile concoction called "Coca Cola" can be good for you in any situation. For the athlete, the only thing going for it is the fact that it contains sugar and water.  There are plenty of things that have sugar and water and in a better form too.  Now how does that compare with the "goto"? :)

> 
> Derek the Dietician
> 
> 

Matthew Wilson, the man of many names, I've noticed :).

Later,

John

August 15, 2003
In article <bhjbbb$420$1@digitaldaemon.com>, Frank D. Wills says...
>Considering all that Walter has put into this
>effort, I do not think that it is a fitting
>response to turn this group into a bunch of
>bickering children.

I'm a little incredulous that we could get so worked up over an issue so mundane as gotos. If everyone is going to get into a big huff and bickering, it should be about templates or runtime object reflection or stack unwinding or soemthing else important.

--Benji Smith


August 15, 2003
"John Reimer" <jjreimer@telus.net> wrote in message news:bhjd2s$5ob$1@digitaldaemon.com...
>
> Matthew Wilson wrote:
> > What we're talking about here is something that is almost always bad,
but
> > sometimes very good. A better analogy in this case would be a can of
Coke.
> > Bad in almost all conceivable circumstances, but if you've got a cycling-<substitute your sport of choice here, so long as it's not golf!>-headache, then the combination of water, high concentration of
simple
> > carbohydrates and big shot of caffeine are exactly appropriate.
Rehydrates,
> > gives your brain some well needed carbs, and opens up the blood vessels
in
> > the old grey matter to assuage the ache until the rehydration kicks in. Marvellous!
>
> Well that's kind of accurate, but I'd say that my brain will not be the thing so starving for carbs.  It gets just as much as it needs.  As a runner, my legs will be grabbing all the sugars they can get first.  In fact, I'd say my brain goes into a minimal carb burn state on long runs -- zombie style. Caffeine does help for endurance, I here.
>
> Although, if you ever run, you'll NEVER want to have a carbonated drink.
>   The...um... "air bubbles" really get in the way of breathing -- really.
> Drink juice instead.
>
> Otherwise the coke analogy sounded more like a euphemism for a bad habit
> ;).  I still have trouble believing the volatile concoction called "Coca
> Cola" can be good for you in any situation. For the athlete, the only
> thing going for it is the fact that it contains sugar and water.  There
> are plenty of things that have sugar and water and in a better form too.
>   Now how does that compare with the "goto"? :)
>
to quote the late Gary Howland : "you known Coca cola (TM) used to have
cocaine in it!"
and caffine is diuretic so can make you more dehydrated
and I was under the impression that high dose of sugar (simple or complex)
when you blood sugars are low from excersise was the worse thing to do (can
cause hypoglycemia and eventually lead to type 2 diabeties) more compex
carbs or proteins where better to relenish the bodys energy store (and water
as the liver need water to store sugars)