Closed dswitzer closed 12 years ago
it was the coding style brought over from cfwheels. mark has checked and using local instead is a better fit for performance reasons. We can switch it back. sorry about this.
@rip747
I doubt think there's any performance benefit, but I certainly think it's a more acceptable practice. For open source projects, I think that's important to stick to well accepted practice (when ever possible) as it more likely that the code base will stay consistent.
I'll try hard to conform to whatever standards are set, but I thought I'd ask about it.
I generally prefer to declare all my variables explicitly--it just "feels" more complete to me.
There is a performance benefit. See the conversation here: https://github.com/rip747/Mustache.cfc/commit/62514525231f66ae2af7d622ee3645e2a250a710
I've updated all the "loc" variables to use "local" instead.
Just curious as to why the code is using "loc" as a local scope instead of "local".
Since CF9 actually has a "local" scope, it would seem wisest to convert the code to a more commonly accepted methodology.