lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


		
		Interesting. I think it's fascinating that you dislike this;
it
		suggests that there's some basic difference in our
programming
		backgrounds or something. I really like having the iterator
variable
		for a loop construct be automatically local to that loop.
Using the
		same variable as a global and a loop counter is sorta tacky
looking,
		I probably wouldn't usually do that, but using a common
variable
		name like "i" for a loop index is a comfortable style, and I
like
		the feature that you can keep doing it as you nest loops,
only
		switching to distinct loop variable names of you expressly
want the
		outer loop's index to be accessible within the inner loop.

*	I have to agree, most loops variables really want to be anonymous,
you 
*	want an iterator not a variable.
*	
		> - About the break I have to repeat myself:  I don't like
the concept
		> of break-labels.  If you want labels, add a goto but not a
break.
		> If you want a multi level break, use break-levels.  Sorry.

		Another interesting one. I much prefer breaks with labelled
blocks
		(e.g. perl) over counted break levels (e.g. /bin/sh) or
gotos.
		Breaks are more constrained than gotos, it's more
immediately
		obvious to me what control flow is happening.

		>Yes very interesting, break levels sound so elegant and
intuitively it seems as if they
		>should work better than labels, but in practical terms
labels turn out better. Maybe there is 
		>something else that could serve. Back to line numbers? :-)

		lcs