Re: New keyword added: continue

new topic     » goto parent     » topic index » view thread      » older message » newer message

c.k.lester wrote:
> 
> Matt Lewis wrote:
> > c.k.lester wrote:
> > > Ah, I see how next/continue would work there, and retry. But restart-
> > > jumping OUT of a loop and then going back into it- looks like it might
> > > cause interpreter pains (memory leaks, etc.). And jumping out of the loop?
> > > Dunno. Maybe an interpreter modifier can speak to that.
> > You're probably afraid of 'exit', too.  :P
> > Seriously, exit is just a goto to the end of the loop.  It doesn't do any 
> > clean up or anything.  There isn't any needed.
> 
> You'd know.
> 
> I'm curious that there's no clean up necessary. It looks like there'd be a
> dangling variable. Eeeewwwwwww!!! :D

Basically, each loop variable gets a slot in the symbol table.  If it's not
top level code, then it 'goes away' just like all the other private variables.

> (I admit I've never used exit. I'm not a sloppy enough coder. HAHAHAHA. Just
> kidding. I might've used it once. Well, I just checked bbcmf-system. Out of
> about 8.6KLOC, exit appears 0 times. So, I probably never have used i

>grep -c exit eusql.e
21

Maybe it's not in bbcmf, but you depend upon it. :)

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu