Front Page All Articles Recent Changes Random Article

Contents

Concatenative language

  • ACL
  • Ait
  • Aocla
  • Breeze
  • Callisto
  • Cat
  • Cognate
  • colorForth
  • Concata
  • CoSy
  • Deque
  • DSSP
  • dt
  • Elymas
  • Enchilada
  • ETAC
  • F
  • Factor
  • Fiveth
  • Forth
  • Fourth
  • Freelang
  • Gershwin
  • hex
  • iNet
  • Joy
  • Joy of Postfix App
  • kcats
  • Kitten
  • lang5
  • Listack
  • LSE64
  • Lviv
  • Meow5
  • min
  • Mirth
  • mjoy
  • Mlatu
  • Ode
  • OForth
  • Om
  • Onyx
  • Plorth
  • Popr
  • Porth
  • PostScript
  • Prowl
  • Quest32
  • Quackery
  • r3
  • Raven
  • Retro
  • RPL
  • SPL
  • Staapl
  • Stabel
  • Tal
  • Titan
  • Trith
  • Uiua
  • Worst
  • xs
  • XY
  • 5th
  • 8th

Concatenative topics

  • Compilers
  • Interpreters
  • Type systems
  • Object systems
  • Quotations
  • Variables
  • Garbage collection
  • Example programs

Concatenative meta

  • People
  • Communities

Other languages

  • APL
  • C++
  • Erlang
  • FP trivia
  • Haskell
  • Io
  • Java
  • JavaScript
  • Lisp
  • ML
  • Oberon
  • RPL
  • Self
  • Slate
  • Smalltalk

Meta

  • Search
  • Farkup wiki format
  • Etiquette
  • Sandbox

Concatenative language/Meta-programming

Higher-order concatenative languages, such as Joy and Factor, represent quotations (anonymous functions) as lists. This means that any list manipulation operations can be used to construct new programs and run them. In Factor, the compiler itself is extensible with Macros and so new programs can be constructed at compile time. Thanks to easy meta-programming, Concatenative languages can absorb many different paradigms with ease. Factor supports Functional programming, Object-oriented programming, and Dataflow programming (with the models vocabulary).

This is similar to macro meta-programming in Lisp and Scheme. While powerful macros are often cited as the raison d'être for Lisp's parenthetical syntax and heavy nesting, concatenative languages achieve a similar level of expressive power with much "flatter" and simpler programs.

Even without explicit language support, it is often possible to write very high-level code in a concatenative style, which has a declarative feel. This is because the language is more fluid: there are no expressions and no statements, instead your program is one word after another. Any structure in the program comes from convention or from the meaning of the words, not from the syntax of the language, and so the programmer is free to invent their own conventions to achieve whatever level abstraction they want.

This revision created on Thu, 11 May 2017 09:01:05 by Wodan58 (Rollback)

Latest Revisions Edit

All content is © 2008-2024 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.