> No, and I'm always the first to point out that optimizing without
> profiling is bad practice.

Only if I don't get in first! ;-)


> However, a lot of CFers don't realize that
> list operations are inherently pretty slow so suggesting right()
> instead of listLast() was meant to be more of a general poke

And fair enough too.


> especially since, in my opinion, listLast() is just plain
> inappropriate here: a filename is a string, not a list.

In a more broad situation, in which you're trying to extract *any* file
extension, how would you got about it?

Would you contrive some sort of lastIndexOf() method to find where the last
dot is, and then take the characters to the right of that?  Or simply use
listLast()?  Pedantry might recommend the first option.  Good sense would
probably suggest the latter.

I think as soon as Allaire allowed any character(s) to be delimiters,
exactly what consitutes a "list" in the CF vernacular kind of moved away
from the notion you or I might have of a "list".

And this entry in the CF docs makes for interesting reading,too.
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/variabl9.htm#wp1100932

<quote>
ColdFusion includes functions that operate on lists, but it does not have a
list data type. In ColdFusion, a list is just a string that consists of
multiple entries separated by delimiter characters.
</quote>

So... what's a list?

-- 

Adam

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to