rip747 / Mustache.cfc

{{ mustache }} for ColdFusion
http://mustache.github.com/
MIT License
46 stars 22 forks source link

Why does the code use "loc instead of the more accepted "local" #10

Closed dswitzer closed 12 years ago

dswitzer commented 12 years ago

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.

rip747 commented 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.

dswitzer commented 12 years ago

@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.

markmandel commented 12 years ago

There is a performance benefit. See the conversation here: https://github.com/rip747/Mustache.cfc/commit/62514525231f66ae2af7d622ee3645e2a250a710

dswitzer commented 12 years ago

I've updated all the "loc" variables to use "local" instead.