Talk:Snake case

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 

Sourcing[edit]

Added section. —Nils von Barth (nbarth) (talk) 04:34, 14 August 2015 (UTC)

I hate to be a killjoy for such a fun article as this one, but I think it doesn't really meet WP standards for sourcing. For "kebab-case" (which is a great name IMO), a stack overflow question is referenced, but the SO comments make it clear the WP citation was first. Is there any real authoritative sourcing on this? It looks like original research to me. Fool4jesus (talk) 15:38, 30 October 2014 (UTC)

kebab-case is pretty common nomenclature in the NodeJS community. Here's another use of it in a very well known project: https://lodash.com/docs#kebabCase 8.26.157.128 (talk) 02:04, 6 February 2015 (UTC)

It’s totally appropriate to insist on sourcing, especially for neologisms; earlier versions of this article and the referenced Stack Overflow one both had citogenesis, and even stated that this was an example of citogenesis! As of this edit and that edit I’ve moved the discussion of other naming conventions to naming convention (programming), where they below, briefly noted the non-standard terms here, and elaborated briefly there.
“snake_case” itself is well-attested and has a clear origin in 2004.
Interestingly, the Stack Overflow post in 2012 is the earliest cite I’ve found for “kebab-case”, and may be the origin. It has since gotten some broader use, including in print, and may become standard. Regardless, this is about snake_case, not kebab-case, so no extended discussion here.
—Nils von Barth (nbarth) (talk) 04:45, 14 August 2015 (UTC)

Isn't Screaming snake case a variant on Kebab case?[edit]

In the example for screaming snake case "THIS_IS_AN_EXAMPLE", no hyphens are used as is normal in kebab case. Shouldn't it be "THIS-IS-AN-EXAMPLE"?

Reading more about the casing, I guess I'm wrong, but the text is a little confusing in how it jumps to a base variant. But maybe that's just me.M4bwav (talk) 20:39, 30 March 2015 (UTC)

You’re confused, but the naming is confusing.
snake_case originated in Ruby, as a term for lowercase_with_underscores, so by analogy with SCREAMING CAPS, some people (Ruby Style Guide: Naming) call UPPERCASE_WITH_UNDERSCORES by the name SCREAMING_SNAKE_CAPS. This hasn’t caught on as widely though, and has the traditional name MACRO_CASE, due to its use as macros for the C preprocessor.
Today UPPERCASE-WITH-DASHES is rare, though the most-suggested name I’ve seen is COBOL-CASE, since COBOL is well-known for using UPPERCASE, and also used dashes (this is noted at UnderscoreVersusCapitalAndLowerCaseVariableNaming). Alternatively, it could be called SCREAMING-KEBAB-CASE, but that seems unlikely.
—Nils von Barth (nbarth) (talk) 05:01, 14 August 2015 (UTC)