It would be very easy for a maintenance developer to re-initialize the value
from a struct to an array somewhere in the middle of the function. That
would leave the <cfset var foo = structNew()> sitting there waiting to
confuse the next maintenance programmer who comes along.

This is where management comes in. If there are practices and procedures that are a requirement it is up to the manager to make sure they are met. Just because it is possible that this situation may pop up, it doesn't mean you should ignore good practices.



I'm not so sure that you can just glance at the top of a function and know
that the variables are going to be the type they are declared as.

Again that is a management practice, it is up to your SLP.

CFML being the typeless language that it is, there is nothing to stop
someone from changing the type of a variable as necessary.

No, just like a stop sign, there is nothing making me stop, I do it because that is the law. If you have the law in place with consequences that it will deture people from doing so.


I tend to try to avoid doing things that could mislead people (especially
myself) in the future, so I use minimal commenting and very rarely use the
metadata attributes (displayname, hint) of any of the CFC tags. That is
another reason for initializing variables the way I do.

If you have a standard practice and follow it, how can that be confusing?


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

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

Reply via email to