Concatenative programming language

A concatenative programming language is a point-free computer programming language in which all expressions denote functions, and the juxtaposition of expressions denotes function composition.[1] Concatenative programming replaces function application, which is common in other programming styles, with function composition as the default way to build subroutines.

Example

For example, a sequence of operations in an applicative language like the following:

y = foo(x)
z = bar(y)
w = baz(z)

...is written in a concatenative language as a sequence of functions:[2]

x foo bar baz

Functions and procedures written in concatenative style are not value level, i.e. they typically do not represent the data structures they operate on with explicit names or identifiers. Instead they are function level – a function is defined as a pipeline, or a sequence of operations that take parameters from an implicit data structure upon which all functions operate, and return the function results to that shared structure so that it will be used by the next operator.[3]

The combination of compositional semantics with a syntax that mirrors such a semantic makes concatenative languages highly amenable to algebraic manipulation of programs;[4] although it may be difficult to write mathematical expressions directly in them.[5] Concatenative languages can be implemented efficiently with a stack machine, and are commonly present implicitly in virtual machines in the form of their instruction sets.[5]

Properties

The properties of concatenative languages are the result of their compositional syntax and semantics:

  • The reduction of any expression is the simplification of one function to another function; it is never necessary to deal with the application of functions to objects.[6]
  • Any subexpression can be replaced with a name that represents the same subexpression. This is referred to in the concatenative community as factoring and is used extensively to simplify programs into smaller parts.
  • The syntax and semantics of concatenative languages form the algebraic structure of a monoid.[7]
  • Concatenative languages can be made well-suited to an implementation inspired by linear logic where no garbage is ever generated.[8]

Implementations

The first concatenative programming language was Forth, although Joy was the first language to call itself concatenative. Other concatenative languages are dc, Factor, Onyx, PostScript, and RPL.

Most existing concatenative languages are stack-based; this is not a requirement and other models have been proposed.[9][10][11] Concatenative languages are currently used for embedded, desktop, and web programming, as target languages, and for research purposes.

Most concatenative languages are dynamically typed. Exceptions include the statically typed Cat language.[12]

See also

References

  1. ^ "Christopher Diggins: What is a concatenative language". Drdobbs.com. 2008-12-31. Retrieved 2013-07-01.
  2. ^ "Name code not values". Concatenative.org. Retrieved 13 September 2013.
  3. ^ "Concatenative language". Concatenative.org. Retrieved 13 September 2013.
  4. ^ "Rationale for Joy, a functional language". Archived from the original on 2011-01-15.
  5. ^ a b "Why Concatenative Programming Matters". Retrieved 13 September 2013.
  6. ^ "von Thun, Manfred: Joy compared with other functional languages". Archived from the original on 2011-10-06.
  7. ^ "von Thun, Manfred: Mathematical foundations of Joy". Archived from the original on 2010-07-31.
  8. ^ "Henry Baker: Linear Logic and Permutation Stacks — The Forth Shall Be First". Home.pipeline.com. Archived from the original on 2014-07-24. Retrieved 2013-07-01.
  9. ^ "The Concatenative Language XY". Nsl.com. Retrieved 2013-07-01.
  10. ^ "The Enchilada Programming Language". Enchiladacode.nl. Retrieved 2013-07-01.
  11. ^ "The Om Programming Language". Om-language.org. Retrieved 2013-07-01.
  12. ^ "Cat Specification". Cat-language.com. Archived from the original on 2015-02-05. Retrieved 2013-07-01.

Read other articles:

Chinese Crested Dog Hairless Chinese Crested Dog standing Nama panggilan Crested, Puff Negara asal Tiongkok[1] Ciri-ciri Klasifikasi & standar FCI Grup Seksi {{{fcisection}}} #{{{fcinum}}} standar Anjing Berjambul Tiongkok salah satu anjing ras kecil yang berasal dari Tiongkok dan dicirikan dengan tubuh yang kurus.[2] Pada abad ke-16, pelaut Tiongkok membawa anjing ini di kapal laut untuk berburu tikus dan menjualnya kepada penduduk lokal di sekitar pelabuhan yang mereka ...

 

 

Foreign administration of Byzantine empire Olga, ruler of the Kievan Rus', along with her escort in Constantinople (Madrid Skylitzes, Biblioteca Nacional de España, Madrid) Modern depiction of the reception of the ambassadors of Emperor Constans II at the court of Tang Taizong at Chang'an, 643 CE Byzantine diplomacy concerns the principles, methods, mechanisms, ideals, and techniques that the Byzantine Empire espoused and used in order to negotiate with other states and to promote the goals ...

 

 

Sriwijaya RadioPT Radio Swara Sriwijaya IndahKotaPalembangWilayah siarPalembang dan sekitarnyaSloganSikok-Sikoknyo Radio PalembangFrekuensi94.3 FMMulai mengudara13 Juli 2002BahasaBahasa Palembang, Bahasa IndonesiaNama sebelumnyaSriwijaya FMFrekuensi sebelumnya92,85 FMJaringanBens RadioPemilikIndonesia Media (2002-2003)Etnikom Network (2003-sekarang)Situs webSriwijayaradio Sriwijaya RadioNegaraIndonesiaKantor pusatJalan Seduduk Putih 1, No 41A, 8 Ilir Palembang, Sumatera Selatan 30114 Indonesi...

Mark Rutte Perdana Menteri Kerajaan BelandaPetahanaMulai menjabat 14 Oktober 2011Penguasa monarkiBeatrixWillem-AlexanderWakilKabinet Rutte I: Maxime Verhagen (2010–2012)Kabinet Rutte II: Lodewijk Asscher (2012–2017)Kabinet Rutte III: Hugo de Jonge (2017–2022)Kajsa Ollongren (2017–2022)Carola Schouten (2017–2022)Kabinet Rutte IV: Sigrid Kaag (2022–)Wopke Hoekstra (2022–2023)Karien van Gennip (2023–)Carola Schouten (2022–) PendahuluJan Peter BalkenendePenggantiPetahanaPemi...

 

 

Friedrichskoog Letak Friedrichskoog di Dithmarschen NegaraJermanNegara bagianSchleswig-HolsteinKreisDithmarschen Municipal assoc.Marne-NordseePemerintahan • MayorKarl Heinrich ThomsenLuas • Total53,96 km2 (2,083 sq mi)Ketinggian0 m (0 ft)Populasi (2013-12-31)[1] • Total2.475 • Kepadatan0,46/km2 (1,2/sq mi)Zona waktuWET/WMPET (UTC+1/+2)Kode pos25718Kode area telepon04854, 04856Pelat kendaraanHEI Friedric...

 

 

Ini adalah nama Tionghoa-Indonesia, marganya adalah Tan (陳) dr.Sofyan Tan陳金揚 Anggota Dewan Perwakilan RakyatRepublik IndonesiaPetahanaMulai menjabat 1 Oktober 2014Perolehan suara113.716 (2014)[1] 158.495 (2019)[2]Daerah pemilihanSumatera Utara I Informasi pribadiLahirTan Kim Yang25 September 1959 (umur 64)Medan, Sumatera Utara, IndonesiaKebangsaanIndonesiaPartai politikPartai Demokrasi Indonesia PerjuanganAfiliasi politiklainnyaPartai Golongan Karya (sebelumny...

Untuk Kegunaan lainnya, lihat Kepulauan vulkanik (disambiguasi). 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: Kepulauan vulkanik – berita · surat kabar · buku · cendekiawan · JSTOR Kepulauan vulkanik merujuk pada sebuah kepulauan dengan pulau-pulau...

 

 

Church in New South Wales, AustraliaSt Andrew's Cathedral, SydneyCathedral Church of Andrew the ApostleWest front33°52′26″S 151°12′23″E / 33.873923°S 151.206336°E / -33.873923; 151.206336LocationGeorge Street, Sydney CBD, New South WalesCountryAustraliaDenominationAnglicanChurchmanshipLow church evangelical[1]Websitesydneycathedral.comHistoryStatusCathedralFounded31 August 1819 (1819-08-31)1837Founder(s)Governor Lachlan MacquarieBish...

 

 

Kesultanan Jalayirid1335–1432StatusKekaisaranPemerintahanMonarkiSejarah • Didirikan 1335• Dibubarkan 1432 Didahului oleh Digantikan oleh Ilkhanate Kara Koyunlu Sunting kotak info • Lihat • BicaraBantuan penggunaan templat ini Bagian dari seri mengenai Sejarah Iran Mitos Sejarah Wangsa Pisydadi Wangsa Kayani Zaman Kuno SM Peradaban Kura-Aras 3400–2000 Proto-Elam 3200–2700 Elam 2700–539 Kekaisaran Akadia 2400–2150 Bangsa Kass ca.1500 – ca.1155 Kekais...

Disambiguazione – Se stai cercando la proprietà del sangue, vedi Gittata cardiaca. Traiettoria parabolica percorsa da un proiettile nel vuoto La gittata è la distanza longitudinale percorsa da un corpo lanciato in aria, avente quindi velocità con componente vettoriale in ascissa e in ordinata.[1] In campo militare, la gittata di un'arma (o portata) corrisponde alla distanza massima cui un'arma può colpire un bersaglio. Indice 1 Approccio cinematico 2 Note 3 Bibliografia 4 Altri...

 

 

Irish rock musician, bassist of U2 (born 1960) This article is about the musician. For the footballer, see Adam Clayton (footballer). Adam ClaytonClayton performing in 2018Background informationBirth nameAdam Charles ClaytonBorn (1960-03-13) 13 March 1960 (age 64)Chinnor, Oxfordshire, EnglandOriginDublin, IrelandGenres Rock alternative rock pop rock post-punk Occupation(s)Musician, songwriterInstrument(s)Bass guitarYears active1976–presentLabels Island Interscope Mercury CBS Ireland Me...

 

 

斯洛博丹·米洛舍维奇Слободан МилошевићSlobodan Milošević 南斯拉夫联盟共和国第3任总统任期1997年7月23日—2000年10月7日总理拉多耶·孔蒂奇莫米尔·布拉托维奇前任佐兰·利利奇(英语:Zoran Lilić)继任沃伊斯拉夫·科什图尼察第1任塞尔维亚总统任期1991年1月11日[注]—1997年7月23日总理德拉古京·泽莱诺维奇(英语:Dragutin Zelenović)拉多曼·博若维奇(英语:Radoman Bo...

Questa voce sull'argomento calciatori polacchi è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Kazimierz Przybyś Nazionalità  Polonia Altezza 185 cm Calcio Ruolo Difensore Termine carriera 1990 CarrieraSquadre di club1 1983-1984 Śląsk Breslavia38 (0)1984-1990 Widzew Łódź147 (1)Nazionale 1985-1987 Polonia15 (0) 1 I due numeri indicano le presenze e le reti segnate, per le sole part...

 

 

Pour les articles homonymes, voir Carter. Fondation CarterHistoireFondation 1982CadreType Organisation à but non lucratif, organisation non gouvernementaleForme juridique Association 501(c)(3)Siège AtlantaPays  États-UnisOrganisationFondateurs Jimmy Carter, Rosalynn CarterPrésident Jason Carter (en) (depuis 2015)Sponsor National Endowment for DemocracyChiffre d'affaires 331,9 M$ (2016), 117,8 M$ (2017), 130,3 M$ (2018), 128 M$ (2019)Site web (en) www.cartercenter.orgIdentifiant...

 

 

2013 edition of the World Championships in Athletics 14th IAAF World Championships in AthleticsNations203 [1]Athletes1,784Events47Dates10–18 August 2013Opened byPresident Vladimir PutinMain venueLuzhniki Stadium← Daegu 2011Beijing 2015 → The 14th IAAF World Championships in Athletics (Moscow 2013)[2] (Russian: Чемпионат мира по лёгкой атлетике 2013) was an international athletics competition held in Moscow, Russia, from 10 t...

ليم تقسيم إداري  البلد السعودية  تعديل مصدري - تعديل   ليم هو مركزٌ سعوديٌ تابعٌ لمحافظة ضرية التابعة لمنطقة القصيم، في المملكة العربية السعودية. المركز من الفئة (ب)، ورمزه 1883 حسب دليل الترميز الموحد للمناطق الإدارية بالمملكة العربية السعودية.[1] الموقع هذا القس�...

 

 

Covered structure used to offer limited protection to vehicles, primarily cars, from rain and snow Carport in front of garagesOne example of the many common types of modern carports sold on the market. This particular one is a stand-alone model. Carport in Japan A carport is a covered structure used to offer limited protection to vehicles, primarily cars, from rain and snow. The structure can either be free standing or attached to a wall. Unlike most structures, a carport does not have four w...

 

 

Involvement of Belgium in the First World War Cartload of Belgian government public records, books and documents as it flees the Imperial German Army, published in November 1914 1918 American poster used to encourage the purchase of War Bonds The history of Belgium in World War I traces Belgium's role between the German invasion in 1914, through the continued military resistance and occupation of the territory by German forces to the armistice in 1918, as well as the role it played in the int...

Intellectual who uses humor in writing or public speaking For the racehorse, see Humorist (horse). Not to be confused with Humorism. Samuel Clemens, American humorist who wrote under the pen name Mark Twain. A humorist is an intellectual who uses humor, or wit, in writing or public speaking. A raconteur is one who tells anecdotes in a skillful and amusing way. Henri Bergson writes that a humorist's work grows from viewing the morals of society.[1] The term comedian is generally applie...

 

 

الضربة الصاعقة あしたへフリーキック الضربة الصاعقة الضربة الصاعقة نوع رياضة أنمي تلفزيوني كاتب يو ياماموتو مخرج تيتسورو أمينو ستوديو أشي برودكشن بث شبكة تلفزيون نيبون العرض الأصلي 14 ابريل 1992 – 29 سبتمبر 1992 عدد الحلقات 52 دبلجة عربية دبلجة مركز الزهرة للإنتاج والتوزيع الفني تو�...