If I understand your meaning (that looping variables are a place your team can cheat), then I would encourage you to stop letting them cheat. Looping variables like "i" are the most likely to encounter variable collision across methods.
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Roland Collins > Sent: Tuesday, February 10, 2004 9:37 PM > To: [EMAIL PROTECTED] > Subject: RE: [CFCDev] How should I define variable in a CFC? > > > Always the exception ;) I must admit that this is definitely one place I > don't mind letting my team cheat. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Barney Boisvert > Sent: Tuesday, February 10, 2004 11:45 PM > To: [EMAIL PROTECTED] > Subject: RE: [CFCDev] How should I define variable in a CFC? > > You've got a very valid point, with one exception: "throwaway" looping > variables, particularly of the array index variety. Those variables are > always a pain in the ass to deal with, particularly if you have to > predeclare them. And it's even worse in CF, because you don't HAVE to > predeclare them, so you can get the most annoying bugs. > > Things would be much better if we could have "block-scoped" > variables (like > in C or Java), as well as "function-scoped", because then the looping > variables could be AUTOMATICALLY made block scope, with the need to > predeclare them if you want to use them after the loop is complete. Not > sure how that would work in non-function situations, but perhaps that > behaviour could only be bound to within-function situations. Not like we > don't already have all kinds of screwed up scope rules regarding > functions. > > Cheers, > barneyb ---------------------------------------------------------- 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]
