<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CamelCase, Hyphens &#8211; Under_scores</title>
	<atom:link href="http://wizpip.com/blog/2010/02/camelcase-hyphens-under_scores/feed/" rel="self" type="application/rss+xml" />
	<link>http://wizpip.com/blog/2010/02/camelcase-hyphens-under_scores/</link>
	<description>Random words from WizPip</description>
	<lastBuildDate>Wed, 26 Oct 2011 20:00:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://wizpip.com/blog/2010/02/camelcase-hyphens-under_scores/comment-page-1/#comment-4087</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 08 Dec 2010 23:11:56 +0000</pubDate>
		<guid isPermaLink="false">http://wizpip.com/blog/?p=66#comment-4087</guid>
		<description>I agree that hyphens are generally used in word boundaries - but when I&#039;m creating class names and IDs they should be treated by the interpreter as tokens - which I feel makes an underscore more appropriate. Whilst I understand that underscores never used to be valid, from a programming point of view I&#039;m still quite set on using them.

These days, the difference between a hyphen and an underscore is quite trivial; it doesn&#039;t really matter what you use. The important thing is to stay consistent in your code.</description>
		<content:encoded><![CDATA[<p>I agree that hyphens are generally used in word boundaries &#8211; but when I&#8217;m creating class names and IDs they should be treated by the interpreter as tokens &#8211; which I feel makes an underscore more appropriate. Whilst I understand that underscores never used to be valid, from a programming point of view I&#8217;m still quite set on using them.</p>
<p>These days, the difference between a hyphen and an underscore is quite trivial; it doesn&#8217;t really matter what you use. The important thing is to stay consistent in your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan</title>
		<link>http://wizpip.com/blog/2010/02/camelcase-hyphens-under_scores/comment-page-1/#comment-4086</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Wed, 08 Dec 2010 22:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://wizpip.com/blog/?p=66#comment-4086</guid>
		<description>I&#039;m afraid that I strongly disagree with you about using underscores in HTML and CSS!

First, unescaped underscores were actually invalid in the (short-lived) CSS 1 specification, and also in CSS 2; they remained thus until a revision made several years later. (If you look at the original regular expressions and the new ones, you can see where underscores were added; I would probably need to trawl through the mailing lists to find the motivation.)

Second, nowhere in any CSS or HTML specification can I recall underscores being officially used as word separators, nor have I seen them in widely-used extensions to them such as WAI-ARIA. Hyphens, on the other hand, are liberally used—and are actually mandated for class names in Microformats!

URLs often use underscores, with Wikipedia being a prominent example. Hyphens still seem to have an edge, though, perhaps owing to the fact that Google did not recognise underscores word separators (though it did recognise hyphens as such) until some time in 2007. Or so says Matt Cutts, who works at Google.

Now that the spec allows them, and the older browsers that used to choke on underscores are no longer part of anyone&#039;s support profile, we can safely and legitimately use underscores. But, in the context of technologies which almost exclusively use hyphens as word boundaries in every other context, they seem out-of-place.

The only respect in which underscores seem to carry substantive benefits is that your form IDs and names can be the same as whatever variable names or properties you use in your back-end programming language. This is seldom a requirement, although you may have something that does this translation for you automatically; in which case, assuming you are more concerned with speed than minutiae of style, there&#039;s little reason to fight the framework.</description>
		<content:encoded><![CDATA[<p>I&#8217;m afraid that I strongly disagree with you about using underscores in HTML and CSS!</p>
<p>First, unescaped underscores were actually invalid in the (short-lived) CSS 1 specification, and also in CSS 2; they remained thus until a revision made several years later. (If you look at the original regular expressions and the new ones, you can see where underscores were added; I would probably need to trawl through the mailing lists to find the motivation.)</p>
<p>Second, nowhere in any CSS or HTML specification can I recall underscores being officially used as word separators, nor have I seen them in widely-used extensions to them such as WAI-ARIA. Hyphens, on the other hand, are liberally used—and are actually mandated for class names in Microformats!</p>
<p>URLs often use underscores, with Wikipedia being a prominent example. Hyphens still seem to have an edge, though, perhaps owing to the fact that Google did not recognise underscores word separators (though it did recognise hyphens as such) until some time in 2007. Or so says Matt Cutts, who works at Google.</p>
<p>Now that the spec allows them, and the older browsers that used to choke on underscores are no longer part of anyone&#8217;s support profile, we can safely and legitimately use underscores. But, in the context of technologies which almost exclusively use hyphens as word boundaries in every other context, they seem out-of-place.</p>
<p>The only respect in which underscores seem to carry substantive benefits is that your form IDs and names can be the same as whatever variable names or properties you use in your back-end programming language. This is seldom a requirement, although you may have something that does this translation for you automatically; in which case, assuming you are more concerned with speed than minutiae of style, there&#8217;s little reason to fight the framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://wizpip.com/blog/2010/02/camelcase-hyphens-under_scores/comment-page-1/#comment-2202</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 06 Oct 2010 10:29:35 +0000</pubDate>
		<guid isPermaLink="false">http://wizpip.com/blog/?p=66#comment-2202</guid>
		<description>Just what I was looking for!  Really liked the straight-shooter answers.  Personally, though, for PHP and JavaScript I think camelCase is crammed and I like the readability of underscores.  I&#039;ve gotten so used to it that it doesn&#039;t slow my typing down -- it&#039;s as second-nature as a space.</description>
		<content:encoded><![CDATA[<p>Just what I was looking for!  Really liked the straight-shooter answers.  Personally, though, for PHP and JavaScript I think camelCase is crammed and I like the readability of underscores.  I&#8217;ve gotten so used to it that it doesn&#8217;t slow my typing down &#8212; it&#8217;s as second-nature as a space.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

