>
> This technique of yours, Mark, is a bit grim in my view (and it's just
> that: my opinion only).
>
> It's only relevant if one doesn't know the key name already, as one
> CAN do this, quite happily:

Which is exactly where I use it.  If I knew the key already, I would
have written an example like:

StructFind(getStruct(), "key");

> getStruct().key
>
> So this means it's only useful in a situation in which we're using a
> runtime value for the key name, AND we don't want to actually use the
> struct for anything other than getting that one key, because if one
> wanted another key, one would need to call getStruct() again, and
> that's a bit lazy.
>
> And at the base level, it doesn't quite sit right with me that one
> would be using a getter for a "non-predefined".  It's as if one
> doesn't know what member variables one's object has.  Which... I
> dunno, doesn't seem "right".

Wow... that's a lot of supposition on surrounding code on a one line
piece of code ;o)

>
> What's a real world use case for this technique, Mark?

Here is a whole bunch:
http://www.koders.com/default.aspx?s=StructFind&btn=&la=ColdFusion&li=*

This is not to say that I couldn't have set the structure to a
variable, and then done it that way, but it's just another option when
I want to simply get something out of a struct, that is encapsulated
in a getter and a setter.

>
> Sure, it demonstrates a usage of structFind(), which was what you're
> pointing out, but I'm not sure how often it's a technique that would
> be something to recommend.

I still don't see how it could be 'bad' ?  It's the same thing as
going struct[key] but, with a method syntax?  Is somehow struct[key]
bad?

I'm really actually confused by this response.

Mark

-- 
E: [EMAIL PROTECTED]
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
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