Yep. I agree with Eric.
Ravi.
Eric Roberts wrote:
> I think the problem is that some folks are confusing scope with type...
>
> Eric
>
> -Original Message-
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 22, 2007 8:46 AM
> To: CF-Tal
I think the problem is that some folks are confusing scope with type...
Eric
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 22, 2007 8:46 AM
To: CF-Talk
Subject: Re: Shocked!
>>I come from a C#/Java background,
Your background is proba
alk
Subject: Re: Shocked!
Date: Tue, 22 May 2007 09:46:05 -0400
> >>I come from a C#/Java background,
>
> Your background is probably to light, I've worked with
> tens of languages, including Fortran, Algol, Pascal, Lisp,
> Snobol, C, C++, Java, and I don't rememb
>>I come from a C#/Java background,
Your background is probably to light, I've worked with tens of languages,
including Fortran, Algol, Pascal, Lisp, Snobol, C, C++, Java, and I
don't remember
any in which scoping was mandatory or even possible for parameters.
--
__
On 5/21/07, Steve Brownlee wrote:
> It just took me
> off guard more than anything and made all the red flags that have been
> pounded into my brain start waving.
As well they should. Off the top of my head I can't think of a more
effective way to obfuscate code... and that includes cfencrypt...
I'm not shocked that ColdFusion does it once I stopped and thought about it.
I come from a C#/Java background, and even though I love CF, I always scope
my variables because I'm so used scoping being enforced. It just took me
off guard more than anything and made all the red flags that
Dave Anderson wrote:
> How would that be dangerous? Because of potential collision with a variable
> of the same name in another scope?
Yes.
> Is the order for var name resolution the same within a cffunction as it is
> elsewhere? Does the arguments scope not get checked first inside a
> cf
witchboard on +44 (0) 20 89107910. The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions."
Visit our website at http://www.reedexpo.com
-Original Message-
From: Sean Corfield
To: CF-Talk
Sent: Mon May 21 22:12:08 2007
Subject:
On 5/21/07, Robertson-Ravo, Neil (RX)
<[EMAIL PROTECTED]> wrote:
> Nice... Or in the application.cfm/cfc. Either way is nice.
No, cfprocessingdirective tells the compiler how to process a single
file. You could have Application.cfm processed differently to you
main.cfm page. All pages are compile
I do not really see anything bad with leaving off the arguments scope even
though I never do it. What amazes me is when I see a UDF that references a
variable within the variables scope of the page calling it. An example is
this current app I have been brought in on recently. Within the
applciat
You should note that function arguments are automatically placed in the local
function scope, so there is nothing conceptually wrong with using the
unprefixed form in this case. Obviously, since it's the first scope checked,
there is no performance impact either.
~~~
This whole thread reminds me of two CFDJ articles.
One by Simon Horwith in the January edition, "ColdFusion: So easy, even
a caveman can do it".
And another article by Brandon Harper, where ColdFusion and Java are
compared to a razor blade and a pair of safety scissors respectively.
CF allows
I wonder if the simple hill folk who cannot learn to scope vars would
put up with a cfprocessingdirective statement or any other
developer-accessible feature that impacts so severely their free-love
style of development.
It would severely pu the screws to some kinds of application
'structure'. Yo
o: CF-Talk
Subject: Re: Shocked!
Yeah, if it performs far far better then for sure, let's enforce it!
~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www
: Peterson, Chris
To: CF-Talk
Sent: Mon May 21 20:41:19 2007
Subject: RE: Shocked!
How about creating a http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278811
Subscription: http://www.houseoffusion.com/grou
How about creating a http://www.adobe.com/products/coldfusion?sdid=RVJR
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278810
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user
bertson
To: CF-Talk
Sent: Mon May 21 20:34:47 2007
Subject: Re: Shocked!
If CF had a "demand scoping" option it would break most of the CF code
out there if what I've seen is any indicator. 'course, since I am a
troubleshooter, the reason I am working on a given lump of code in
ed by Reed Exhibitions."
Visit our website at http://www.reedexpo.com
-Original Message-
From: Christopher Jordan
To: CF-Talk
Sent: Mon May 21 19:53:39 2007
Subject: Re: Shocked!
Scope != type
Robertson-Ravo, Neil (RX) wrote:
> It would defeat the purpose and wonder of ColdFusion
ssage-
From: Gert Franz
To: CF-Talk
Sent: Mon May 21 20:15:21 2007
Subject: Re: Shocked!
Railo has exactly this setting. You can either let Railo scan all scopes
like CFML, or for example the variables scope only. In addition in Railo
you can turn off implicit query scanning as well. So you wo
If CF had a "demand scoping" option it would break most of the CF code
out there if what I've seen is any indicator. 'course, since I am a
troubleshooter, the reason I am working on a given lump of code in the
first place is because the original code was developed by chimps.
--
[EMAIL PROTECTED]
Wish list on Adobe...
Mark
-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: Monday, May 21, 2007 2:04 PM
To: CF-Talk
Subject: Re: Shocked!
Well yeah, I meant more the restriction etc I tend to scope them all
anyway, just force of habit but for
t;variables." scope prefix, so I'd get stung
> by this once in a while too, but hey, that would be a good thing.
>
> Mark
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 21, 2007 1:09 PM
> To: CF-Talk
>
ot necessarily those expressed by Reed Exhibitions."
> Visit our website at http://www.reedexpo.com
>
> -Original Message-
> From: Gaulin, Mark
> To: CF-Talk
> Sent: Mon May 21 18:26:07 2007
> Subject: RE: Shocked!
>
> Yeah, I wish there was an admin setting
Hardly shocking.
Nor dangerous. coldfusion looks at the arguments and var scoped
variables FIRST, and prevents you from creating var scoped variables
with the same name as arguments.
So it's no more or less dangerous than anything else CF does with
regards to variable scoping.
I'm not very cons
expressed within this
communication are not necessarily those expressed by Reed Exhibitions."
Visit our website at http://www.reedexpo.com
-Original Message-
From: Charlie Griefer
To: CF-Talk
Sent: Mon May 21 18:38:12 2007
Subject: Re: Shocked!
On 5/21/07, Robertson-Ravo, Neil (RX)
&l
On 5/21/07, Robertson-Ravo, Neil (RX)
<[EMAIL PROTECTED]> wrote:
> It would defeat the purpose and wonder of ColdFusion being typeless etc.
No it wouldn't. You still wouldn't have to declare a variable as a
type of variable. Just the context to which it belongs.
#variables.myVar#
could be a s
al Message-
From: Gaulin, Mark
To: CF-Talk
Sent: Mon May 21 18:26:07 2007
Subject: RE: Shocked!
Yeah, I wish there was an admin setting that would REQUIRE all variables
to be scoped (like VB's "Option Explicit"). Of course, I sometimes get
lazy and don't include the "variabl
FYI the same principle applies when using CFQuery in case you hadn't
noticed. You don't need to scope the variable to the query as it's set
locally.
!k
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, May 21, 2007 11:09 AM
To: CF-Talk
S
ould be a good thing.
Mark
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, May 21, 2007 1:09 PM
To: CF-Talk
Subject: Shocked!
I just looked at some code from another developer and noticed that they
were accessing variables in the arguments scope wi
On 5/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I was shocked to see my test function work. I just can't
> believe that Adobe would even expose those variables without
> a scope prefix. I know that it does a top-down search
> through the myriad of scopes, but t
How would that be dangerous? Because of potential collision with a variable of
the same name in another scope?
Is the order for var name resolution the same within a cffunction as it is
elsewhere? Does the arguments scope not get checked first inside a cffunction?
>a scope prefix. I kno
if you were aware that CF does a top-down search through the myriad of
scopes... why are you shocked?
On 5/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I just looked at some code from another developer and
> noticed that they were accessing variables in the arguments
> sco
t it
first.
I was shocked to see my test function work. I just can't
believe that Adobe would even expose those variables without
a scope prefix. I know that it does a top-down search
through the myriad of scopes, but this just seems flat out
dangerous.
Was anyone else aware of
33 matches
Mail list logo