Share to: share facebook share twitter share wa share telegram print page
Available for Advertising

Camel case

Upper camel case illustrée par un chameau.
Lower camel case illustrée par un dromadaire.
Upper camel case sur un panneau de direction vers le boulevard Champions Gate

La camel case (« casse chameau ») est un style de notation commun en programmation informatique. Il sépare les mots en faisant varier la casse typographique plutôt qu’en insérant des espaces et une ponctuation. Les mots sont accolés et écrits en minuscule, sauf la première lettre de chaque mot qui est majuscule. Ce terme fait référence au dos d’un chameau dont les bosses représentent les majuscules.

On distingue deux variantes selon que la toute première lettre est aussi majuscule ou non : upper camel case (CamelCase), ou « casse chameau haute », et lower camel case (camelCase), ou « casse chameau basse ». Ces termes permettent de désambiguïser la définition face aux conflits de nommage entre différents documents techniques.

Origine

En alphabet latin, la notation semble avoir été pratiquée en premier par les Écossais pour écrire leurs noms de famille, comme le clan MacLeod. Plus tard, elle a été utilisée par des marques ou entreprises, par exemple CinemaScope en 1953, ou plus tard MasterCard, PlayStation, YouTube, iPhone, etc.

La plupart de ces mots sont anglais. Le français est moins propice à l’utilisation de la camel case à cause de ses fréquentes particules « le », « de », « à », etc.

Utilisation

Programmation informatique

Dans les années 1970 cette notation est adoptée pour nommer des fichiers, variables, fonctions ou classes dans de nombreux langages de programmation informatique. Ces noms doivent en effet être constitués de lettres et de chiffres sans espace.

Exemple en Javascript :

const body = document.getElementsByTagName("body");
const myFirstParagraph = document.createElement("p");
const helloWorld = document.createTextNode("Hello, world!");
myFirstParagraph.appendChild(helloWorld);
body.item(0).appendChild(myFirstParagraph);

Une alternative courante à la camel case est la snake case basée sur le tiret bas.

La camel case a également été utilisée par les premiers moteurs de wiki pour faciliter la création de liens internes. Un mot en camel case est plus facile à reconnaître par le logiciel, qui peut le remplacer automatiquement par un lien vers la page portant le même nom que le terme rencontré. Un tel mot est alors aussi appelé tag (c’est-à-dire une balise sémantique ou syntaxique) ou camel case link.

Synonymes

Anglais

Plus rarement, on trouve les synonymes suivants :

  • camel case toute variante :
    • camel back ;
    • bi capitalization ;
    • bumpy caps ;
    • inter caps ;
    • nerd caps ;
    • word mixing ;
  • upper camel case :
    • pascal case[1] (PascalCase) ;
    • capitalized words[2] (CapWords) ;
  • lower camel case :
    • mixed case[2] (mixedCase).

Français

L'Office québécois de la langue française recommande les termes[3] :

  • notation chameau ;
  • casse (de) chameau ;
  • casse mixte.

En rapport avec les wiki, on trouve aussi :

  • mot wiki ;
  • wiki mot ;
  • chat mot.

Notes et références

  1. (en-US) kexugit, « History around Pascal Casing and Camel Casing », sur learn.microsoft.com, (consulté le )
  2. a et b (en) « PEP 8 – Style Guide for Python Code | peps.python.org », sur Python Enhancement Proposals (PEPs) (consulté le )
  3. « notation chameau », Grand Dictionnaire terminologique, Office québécois de la langue française .

Articles connexes

Read other articles:

NgulikPresenterAsri WelasNegara asal IndonesiaBahasa asliBahasa IndonesiaRilisJaringan asliTrans TVRilis asli22 April 2010 (2010-04-22) –17 Oktober 2011 (2011-10-17) Ngobrol Usik dan Asik atau Ngulik merupakan program berbentuk talk show, program bincang-bincang dikemas lebih dinamis dengan konsep syuting EFP. Lokasi syuting bervariasi tergantung tema, bintang tamu dan nara sumber, mulai dari kediaman artis, studio rekaman, hingga pasar tradisional yang dipandu oleh Asri Wela...

Lage des Naturparks Südheide Detailkarte des Naturparks Heidefläche des Naturparks während der Blütezeit Der Naturpark Südheide ist seit 1964 als ein schutzwürdiger deutscher Naturpark in der nach Westen und Osten deutlich umfangreicheren Südheide ausgewiesen. Er ist gekennzeichnet durch große Wald- und Heideflächen. Fünf Prozent seiner Fläche sind als Naturschutzgebiet und 90 Prozent als Landschaftsschutzgebiet ausgewiesen. Inhaltsverzeichnis 1 Lage 2 Entstehung und Geschichte 3 B...

この記事は検証可能な参考文献や出典が全く示されていないか、不十分です。出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方)出典検索?: ドリフト走行 – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL(2011年6月) ポルシェ・911によるドリフト走行 ドリフト走

Victoria auf einem Solidus Kaiser Konstantin II. (rechts) Intaglio aus Lapislazuli mit Darstellung von Victoria, 100–200 n. Chr., gefunden in Tongeren (Belgien) Gallo-Römisches Museum Tongeren Viktoria auf der Berliner Siegessäule, vergoldete Bronzeskulptur von Friedrich Drake Victoria ist die vergöttlichte Personifikation des Sieges (lateinisch victoria) in der römischen Mythologie, Schutzgöttin des römischen Kaisers und jungfräuliche Hüterin des Reiches. Sie ist die Entsprech...

Population density (people per km2) by country This is a list of countries and dependencies ranked by population density, sorted by inhabitants per square kilometre or square mile. The list includes sovereign states and self-governing dependent territories based upon the ISO standard ISO 3166-1. The list also includes unrecognized but de facto independent countries. The figures in the table are based on areas including internal bodies of water such as bays, lakes, reservoirs and rivers. The l...

Commune in Île-de-France, FranceMaisons-LaffitteCommuneChâteau de Maisons-Laffitte Coat of armsLocation (in red) within Paris inner and outer suburbsLocation of Maisons-Laffitte Maisons-LaffitteShow map of FranceMaisons-LaffitteShow map of Île-de-France (region)Coordinates: 48°56′49″N 2°08′44″E / 48.9469°N 2.1456°E / 48.9469; 2.1456CountryFranceRegionÎle-de-FranceDepartmentYvelinesArrondissementSaint-Germain-en-LayeCantonSartrouvilleIntercommunalityCA S...

Wappen von Scampia Scampia Stadtteil von Neapel Lage von Scampia in Neapel Koordinaten 40° 54′ 7″ N, 14° 14′ 25″ O40.90194444444414.240277777778Koordinaten: 40° 54′ 7″ N, 14° 14′ 25″ O Fläche 4,23 km² Einwohner 37.572 (2009) Bevölkerungsdichte 8882 Einwohner/km² Postleitzahl 80144 Municipalità Municipalità VIII Scampia-Secondigliano – Großraum Lage der Vele di Scampia Scampia [skamˈpiːa] ist der 27...

МегазміяMega Snake Вид телефільмЖанр жахифантастикаРежисер Тібор ТакачПродюсер Девід ВародБернд РінгсгвандлБоаз ДевідсонСценарист Боаз ДевідсонРоббі РобінсонАлександер ВольцУ головних ролях Майкл ШенксСірі БарукМіхаль ЯнайБен КардіналОператор Еміль ТопазовКомпозит...

Поляне-над-БлаговицоPoljane nad Blagovico|coordinates_footnotes= |coor_pinpoint= Основні дані 46°11′35″ пн. ш. 14°47′15″ сх. д. / 46.1933330000277778° пн. ш. 14.78750000002777831° сх. д. / 46.1933330000277778; 14.78750000002777831Координати: 46°11′35″ пн. ш. 14°47′15″ сх. д. / 46.1933330000277778° пн. ш...

Untuk akun YouTube, lihat Kisah Tanah Jawa (akun). Pocong Gundul PengarangBonaventura D. GentaMada Zidan (Mbah KJ)Hari KurniawanNegaraIndonesiaBahasaIndonesiaGenreMistisPenerbitGagasMediaTanggal terbit2019ISBNISBN 978-979-780-949-2 Pocong Gundul merupakan salah satu buku yang mengungkapkan sosok yang sebelumnya sudah dipresentasikan di buku karya Kisah Tanah Jawa sebelumnya yang berjudul Jagat Lelembut. Sosok fenomenal ini diceritakan pernah membuat pembaca mual-mual saat melihat gambara...

وسام بيت لحم صورة لوسام بيت لحم مؤسس دولة فلسطين البلد دولة فلسطين يُمنح من طرف رئيس دولة فلسطين نوع الوسام وسام دولة العاهِل محمود عباس منحت لـ الرؤساء والملوك والسياسيين ورجال الدين الحالة مستخدم حاليًا المراتب • رتبة قلادة بيت لحم الكبرى• رتبة نجمة بيت لحم إحصاءات تار...

سفارة أذربيجان في مصر أذربيجان مصر البلد مصر  المكان القاهرة الموقع الالكتروني الموقع الرسمي  تعديل مصدري - تعديل   سفارة أذربيجان في مصر هي أرفع تمثيل دبلوماسي[1] لدولة أذربيجان لدى مصر.[2][3] تقع السفارة في القاهرة وهي تهدف لتعزيز المصالح الأذربيجانية في...

American politician For his nephew, the judge, see Robert Love Taylor (judge). Robert Love Taylor24th Governor of TennesseeIn officeJanuary 17, 1887 – January 19, 1891Preceded byWilliam B. BateSucceeded byJohn P. BuchananIn officeJanuary 21, 1897 – January 16, 1899Preceded byPeter TurneySucceeded byBenton McMillinUnited States Senator from TennesseeIn officeMarch 4, 1907 – March 31, 1912Preceded byEdward W. CarmackSucceeded byNewell SandersMember of the U....

دولار ليبيري5 دولار ليبيريةمعلومات عامةالبلد ليبيريا المنطقة ليبيريا رمز العملة Lib$L$ رمز الأيزو 4217 LRD المصرف المركزي البنك المركزي لليبيريا سعر الصرف 0٫005429 يورو (3 فبراير 2019) العملات المعدنية 5، 10، 25، 50، سنت، دولار واحد[1]تعديل - تعديل مصدري - تعديل ويكي بيانات الدولار الل...

Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Cabo Espichel – berita · surat kabar · buku · cendekiawan · JSTOR Cabo Espichel. Cabo Espichel (lit. Tanjung Espichel) adalah sebuah tanjung yang terletak di sebelah barat Sesimbra, Portugal. Wisatawan s...

Infrared spectrometer used for detecting the composition of a material An image of a Mini-TES [1] An image from Mini-TES on board the Mars Exploration Rovers. The Miniature Thermal Emission Spectrometer (Mini-TES) is an infrared spectrometer used for detecting the composition of a material (typically rocks) from a distance. By making its measurements in the thermal infrared part of the electromagnetic spectrum, it has the ability to penetrate through the dust coatings common to the Ma...

Kongres Amerika Serikat ke-105Gedung Kapitol (1997)Periode3 Januari 1997 – 3 Januari 1999Anggota100 senator435 anggota dewan5 delegasi tanpa suaraMayoritas SenatPartai RepublikPresiden SenatAl Gore (D)Mayoritas DPRPartai RepublikKetua DPRNewt Gingrich (R)Pres. Senat Pro TemporeStrom Thurmond (R)Sesike-1: 7 Januari 1997 – 13 November 1997ke-2: 27 Januari 1998 – 19 Desember 1998ke-104 ←→ ke-106 Kongres Amerika Serikat ke-105 adalah sebuah pertemuan cabang legislatif pem...

Indonesian actress and beauty pageant title holder (born 1991) In this article, the surname is Ames, her English patronymic surname; Dewi is her Javanese matronymic surname. Nadine AmesAmes in 2019BornNadine Alexandra Dewi Ames (1991-05-23) 23 May 1991 (age 32)[1]Winchester, England - Great BritainEducationNorth Jakarta International SchoolGandhi Memorial International SchoolAlma materBath Spa University(BFA in Filmmaking)OccupationsactressmodelphilanthropistHeight1.74 ...

American television sitcom (1986–1990) ALFTitle cardGenre Sitcom Science fiction comedy Created by Tom Patchett Paul Fusco[1] Directed by Tom Patchett Peter Bonerz Rick Gough Nancy Heydorn Paul Fusco Peter Baldwin Nick Havinga Gary Shimokawa Burt Brinckerhoff Tony Csiki Howard Storm Paul Miller Starring Max Wright Anne Schedeen Andrea Elson Benji Gregory Theme music composer Alf Clausen Tom Kramer ComposerAlf ClausenCountry of originUnited StatesOriginal languageEnglishNo. of season...

Haman by Hester en Assueer te gast, Rembrandt (1660), 73x94cm, Poesjkinmuseum. Het schilderij is tamelijk donker, vanwege de vernis die ooit is gebruikt Het schilderij Ahasveros en Haman aan het feestmaal van Esther is een van de weinige werken van Rembrandt van Rijn waarvan alle eigenaren bekend zijn. De herkomst kan worden teruggevoerd tot 1662, twee jaar na zijn voltooiing. Onderwerp Het onderwerp is een episode van het Boek van Ester (Hebreeuwse Bijbel): hoofdstukken 5, 6 en 7. Ester legt...

Kembali kehalaman sebelumnya