Personally, I favour sane defaults rather than having to check for 
presence of variables all the time. And the bigger and more complicated 
your data structs get, I think having to check to see if a variable 
exists is a quick path to insanity.

Side effect of eating too much spaghetti...

grant wrote:
> Wow thanks for the response people. My question is really out of pure 
> laziness - I have a huge struct that i need to check a key for - the 
> actual key path is 
> session.currentuser.currentreport.filters.currentfilter.filterset , 
> where filters, currentfilter and filterset may not be present. so it's 
> heaps easier to do a 
> isDefined("session.currentuser.currentreport.filters.currentfilter.filterset")
>  
> than structKeyExists(session.currentuser.currentreport , "filters") 
> and structKeyExists(session.currentuser.currentreport.filters, 
> "currentfilter") and so on.
>
> or am i missing something?
>
> On 05/06/07, * Haikal Saadh* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
>     Having seen more than my fair share of request scope abuse, I can see
>     why he would.
>
>     I think easy access to request in CF can cause poor code. But then
>     again, guns don't kill people,  people kill people, right?
>
>     Peter Tilbrook wrote:
>     > I agree (disciplined) but he then bagged the "request" scope so
>     now I
>     > am not so sure.
>     >
>     >
>
>
>
>     >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to