I'm on board with the style-critics here... although I think an
artistic CF coder can make a CF page into a work of art... balancing
cfscript and indents and using line breaks in long tags... I enjoy
making my code tidy, even pretty, as much as I do watching it run.

But, I've got a pet peeve about mixing text and vars inside pound signs... like:
"someValue#someVariable#"

I used it for a while, and then immediately dropped it. It's UGLY...
especially when you have nice, tight, clean lines like
someValue[someVariable] instead... or the concat operator...
"someValue" & someVariable

Lately I've realized it makes for more readable, straightforward code
than things mashed together with hashes inside long strings inside
quotes. It's cleaner and doesn't use hashes at all. If I can find a
way to write a routine without them, I will, because they're messy
clutter. Like Sean says about evaluate(), there's far to many times
where they're used when they don't need to be. The only place we need
a hash anymore is in tag attributes
<cffile action="read" file="#myFile#".../>

In CFQUERY (and CFMAIL, perhaps a couple others)
<cfquery name="myQuery" datasource="#request[dsn]#">
select name, value
from table
where id = #myId#
</cfquery>

And in cfoutput:
<cfoutput query="myQuery">#name# = #value#<br></cfoutput>

So there's only a FEW places we should be using pound signs. It's
almost entirely unneccesary on either side of an assignment operation,
shouldn't be used outside quoted strings (save for a few places like
CFMAIL and CFQUERY), and that's about it. The only use for it is to
flag text for CF so it knows "THIS is dynamic text" and "this is
regular static text."

Anyway... just my $.02. No offense to Xavi intended... what you posted
was technically "correct," it's mostly a stylistic issue. I don't like
how it looks. ;)

Laterz,
J

On Wed, 16 Mar 2005 16:17:19 +0100, Xavi <[EMAIL PROTECTED]> wrote:
> or better <cfset "Attributes.#thisKey#" = url[thisKey]>
>  


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to