Content deleted Content added
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation) |
Rescuing 2 sources and tagging 0 as dead.) #IABot (v2.0.9.5 |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 86:
One approach is to [[delimiter|delimit]] separate words with a [[alphanumeric|non-alphanumeric]] character. The two characters commonly used for this purpose are the [[hyphen]] ("-") and the [[underscore]] ("_"); e.g., the two-word name "<code>two words</code>" would be represented as "<code>two-words</code>" or "<code>two_words</code>".
The hyphen is used by nearly all programmers writing [[COBOL]] (1959), [[Forth (programming language)|Forth]] (1970), and [[Lisp (programming language)|Lisp]] (1958); it is also common in [[Unix]] for commands and packages, and is used in [[Cascading Style Sheets|CSS]].<ref>{{cite web |title = CSS reference |website = [[Mozilla Developer Network]] |url = https://developer.mozilla.org/en-US/docs/Web/CSS/Reference |access-date=2016-06-18}}</ref> This convention has no standard name, though it may be referred to as ''lisp-case'' or ''COBOL-CASE'' (compare ''Pascal case''), ''kebab-case'', ''brochette-case'', or other variants.<ref>{{Cite web | title = StackOverflow – What's the name for snake_case with dashes? | url = https://stackoverflow.com/questions/11273282/whats-the-name-for-snake-case-with-dashes }}</ref><ref>{{Cite web | title = Programmers – If this is camelCase what-is-this? | url = http://programmers.stackexchange.com/questions/104468/if-this-is-camelcase-what-is-this | access-date = 13 August 2015 | archive-date = 7 August 2016 | archive-url = https://web.archive.org/web/20160807114459/http://programmers.stackexchange.com/questions/104468/if-this-is-camelcase-what-is-this | url-status = dead }}</ref><ref>{{Cite web | title = Camel_SNAKE-kebab | website = [[GitHub]] | url = https://github.com/qerub/camel-snake-kebab | date = September 2019 }}</ref><ref>[http://c2.com/cgi/wiki?UnderscoreVersusCapitalAndLowerCaseVariableNaming UnderscoreVersusCapitalAndLowerCaseVariableNaming]</ref> Of these, ''kebab-case'', dating at least to 2012,<ref>{{cite web |url=https://stackoverflow.com/posts/12273101/revisions |title=Revisions to jwfearn's answer to What's the name for dash-separated case? |date=5 September 2012 |author=jwfearn}}</ref> has achieved some currency since.<ref>''Living Clojure'' (2015), by Carin Meier, [https://books.google.com/books?id=b4odCAAAQBAJ&pg=PA91 p. 91]</ref><ref>[https://lodash.com/docs#kebabCase lodash: kebabCase]</ref>
By contrast, languages in the FORTRAN/ALGOL tradition, notably languages in the [[C (programming language)|C]] and [[Pascal (programming language)|Pascal]] families, used the hyphen for the [[subtraction]] [[infix notation|infix]] operator, and did not wish to require spaces around it (as [[free-form language]]s), preventing its use in identifiers.
Line 266:
===Pascal, Modula-2 and Oberon===
Wirthian languages Pascal, Modula-2 and Oberon generally use <code>Capitalized</code> or <code>UpperCamelCase</code> identifiers for programs, modules, constants, types and procedures, and <code>lowercase</code> or <code>lowerCamelCase</code> identifiers for math constants, variables, formal parameters and functions.<ref>[https://web.archive.org/web/20161008155209/http://modula-2.info/m2r10/pmwiki.php/Recommendations/NameConvention#Identifiers Modula-2 Name Convention]</ref> While some dialects support underscore and dollar signs in identifiers, snake case and macro case is more likely confined to use within foreign API interfaces.<ref>
===Perl===
|