iGiveInTo CamelCase
Posted by Jesse Freeman | Filed under Advanced Topics
Its a sad sad day for me but I have finally conceded and am going back to camel case. I got lots of good feedback from my original post on CamelCase vs Underscore but the fact remains. The entire ActionScript language is written in CamelCase. Now that I am open sourcing lots of my code I also feel compelled to revert back and help make my code follow suit with what everyone else is doing.
I have used underscores for over 3 years now but as AS 3 becomes more of a “grown up” language I feel the need to follow the language standard and go back. Maybe one day things will change but I highly doubt it. To anyone I have inspired to fight the standard and break the rules I am sorry. May you continue the fight and at heart I will always be an underscore person. To help ease the transition I will continue to follow the same variable prefix convention I have always held onto:
- publicVarName For public vars I just state them.
- _privateVarName For private, and protected vars I use a single underscore.
- __staticVarName For Static vars I use a double underscore.
- CONSTANT_VAR_NAME For constants I use all caps with underscores since camel case will not work here (I wonder why?).
For functions I never put any underscores for private, protected or static function names. I just find that silly and a pain to type out. And so marks the end of a 3 year tradition. I hope there will be someone else to carry the touch but I am done, for now.
Feel free to rant, flame, agree or whatever in the comments.
-
pmarsh
-
Myles
-
Kris












