G'day. >First, people should consider the 'arguments' scope a depricated carryover from 6.0 that was required to not break code, but should NEVER be used.
Why should they consider that? >In 6.0 there wasn't a local variables scope, so any guidelines that went along with the 'arguments' scope can't be applied to 6.1 where there is a local variables scope. In other words, 6.0 arguments and 6.1 arguments are effectively two completely different things. I think youre overstating the case a bit there. Indeed putting the cart before the horse, really. Firstly, the arguments scope is analoguous to the attributes scope of a custom tag. Should we dispense with that too? If not, why not? I also don't get the comment "other languages don't distinguish between arguments and function-local variables". Well no. But then you'll probably find that those languages don't busy themselves *at all* with named scopes like CF does? It's not a very sensible parallel to draw, really. The real issue here is Macromedia's cock-up in that the local variables scope doesn't reside in a scope in the same way all other variables do, ie: you can't access them as "local.foo" or something similar, it's just "foo". This is completely at odds with the rest of CF, and is pretty much the source of all the confusion that has arised regarding arguments / this / variables / [noScopeName]. It's also a right pain in the arse that one cannot iterate over the function local scope (well: no way that I've found, anyhow, so I'm all ears if someone else can do it :-), with a for-in loop, or a structKeyArray() or something similar. Again: this is completely at odds with the rest of CF, and quite crap. Another thing that occurs to me now. If we're never supposed to use the arguments scope... How does one access unnamed args? Using the arguments structure, one can iterate over all the args, and refer to them as arguments[x]. How does one do that with the unnamed local scope? Heh, and don't say "copy them into a local-scoped structure first", because that's a really crap answer given there's a perfectly good arguments scope there already. And that it breaks your idea of "never touching the arguments scope" anyhow :-) So what should be happening is MM shoud leave the arguments scope alone (it continues its analogy to attributes, which makes complete sense, and there are reasons to have it accessible the way it is), and give the function-local scope an accessible name. And probably stop copying the arguments scope into the local variable scope, which was a bit dumb to start with (just pandering to those two don't scope their vars, I guess ;-) Adam ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
