<?xml version="1.0" encoding="windows-1252"?>
<node id="990528" title="Re: camelCase vs snake_case" created="2012-08-29 14:35:44" updated="2012-08-29 14:35:44">
<type id="11">
note</type>
<author id="131279">
talexb</author>
<data>
<field name="doctext">
&lt;p&gt;My preference when it comes to writing code is readability. What that really means is readability &lt;em&gt;to me&lt;/em&gt;. Everyone has a different ideal on how to make code readable.&lt;/p&gt;
&lt;p&gt;To me, a variable name like &lt;c&gt;$camelCase&lt;/c&gt; is very readable. The sigil is full height, and that's followed by a lower case letter. After that, each word within the variable name starts with a capital letter. It's also easy to type: just upper and lower case letters. That's the typography angle for you.&lt;/p&gt;
&lt;p&gt;A variable name like &lt;c&gt;$camel_case&lt;/c&gt; is not as friendly from a typing point of view -- I have to stop typing letters and go and hit the underbar. This gets worse if it's &lt;c&gt;$a_really_long_variable_name&lt;/c&gt;; I never learned to type properly, so my typing style probably contributes to this.&lt;/p&gt;
&lt;p&gt;Worse than this is the choice that combines camelCase with snake_case .. &lt;c&gt;$a_Very_Long_Variable_Name&lt;/c&gt;. If you're able to type that easily and quickly, good for you -- I'll never use it.&lt;/p&gt;
&lt;p&gt;Finally, I've met Damian a few times when he's visited Toronto -- he's a very entertaining speaker and is extremely knowledgeable about Perl and Computer Science. Still, I don't agree with *everything* he says -- in some cases I have my own preferences.&lt;/p&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-131279"&gt;
&lt;p&gt;Alex / [talexb] / Toronto&lt;/p&gt;
&lt;p&gt;&lt;small&gt;"&lt;a href="http://www.groklaw.net"&gt;Groklaw&lt;/a&gt; is the open-source mentality applied to legal research" ~ Linus Torvalds&lt;/small&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
990350</field>
<field name="parent_node">
990350</field>
</data>
</node>
