[thelist] RE: (answer) Randomizing Question

Raymond K. Camden rcamden at allaire.com
Thu Nov 30 07:30:07 CST 2000


> i think you misunderstood what i was saying.  i didn't say that using
> functions within strings would cause memory leaks.  more
> specifically i said
> that the use of hashes unnecessarily could do that.  while the <cfset> tag
> isn't one of them that's prone to it, the issue of readability still
> remains.

Ah, so your saying that you should always do this:

<CFSET STR = "Good morning, your as dumb as " & RandRange(1,100) & "
sheep.">

instead of ".... #..# ...." ?

> escapades.  where this information lies now is unknown.  i'll dig
> though and
> see if i can't find it again.

I'll check my sources too. Again, I've _never_ heard this (although the
readability thing is 100% correct) but of course that doesn't mean your
wrong. ;)

> i do recall from memory that some of the issues had to do with using a
> <cfset> where you were setting a variable and it's value using the
> SetVariable() function but not assigning it to a temp variable, ala:
>
> <cfset SetVariable(foo, form.bar)>
>
> instead of the proper way:
>
> <cfset temp = SetVariable(foo, form.bar)>

Hmmm, I haven't heard that, either, and I never use the temp variable. Let
me see if I can get some answers from development.


> again, this is all from memory.  even if i'm unable to produce a url
> detailing the issues like this that cause memory leaks there's
> enough of an
> argument to not break these rules as they lend themselves to
> sloppy code and
> reduced readability.

Very true.

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Allaire

Email   : jedimaster at allaire.com
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda





More information about the thelist mailing list