It's not immediately clear how to differentiate between public and private properties in CFML CFC s (ColdFusion Components, which in turn are classes). Defining methods is more straightforward, in that they provide for public and private keywords to signal their scope. It would stand to reason that these scoping keywords might also be applicable for properties as well. After all, this is the approach taken with other languages such as Java and PHP . Alas, it is not the case. And to compound matters, searching the Web doesn't really provide much clarification on the matter either. Answers range from, it's just not possible, to initializing variables in the constructor to make them act like private properties. The examples provided here bear out that, CFML, at least running on Railo / Lucee , do in fact, support the scoping of properties. It works like this. Properties intitialized using the this.variableName form are public. Simply i...
A little commentary about the world of
technology and programming. No "holy wars,"
or ideological rants, just posts about tech
news and other findings from around various
places.