Factor (programming language): Difference between revisions

Content deleted Content added
Lichtkind (talk | contribs)
No edit summary
LittleDan (talk | contribs)
No edit summary
Line 1:
'''Factor''' is a [[concatenative programming language]] designed and implemented by [[Slava Pestov]]. Factor's main influences are [[Joy programming language|Joy]], [[Forth programming language|Forth]], and [[Lisp programming language|Lisp]], with minor influences from [[Self programming language|Self]].
 
Like other concatenative languages, Factor has a [[postfix]] syntax, meaning that you write the arguments of a function before the function name. As an example, [[Hello world]] in Factor is
Factor's main influences are [[Joy programming language|Joy]], [[Forth programming language|FORTH]], and [[Lisp programming language|Lisp]].
"Hello world" print
 
Factor is dynamically typed, and a very unique object system accompanies it. In Factor, there are more than 20 base types, and then users can make their own datatypes using tuples. There is no inheritance, but there is delegation as in Self. Additionally, there are other ways to make classes besides types and tuples: Factor supports [[predicate classes]] and union classes. Among Factor's builtin compound datatypes are [linked list]]s, [[vector]]s and [[hashtable]]s. For numbers, Factor supports [[floating point]], ratios, [[complex numbers]] and arbitrary precision integers.
Some of its key features include:
 
* [[Postfix]] syntax
For cases where the stack would be too awkward, Factor gives you [[dynamic scoping]]. Factor has a quickly growing library which already supports [[continuation]]s, an [[Web server|HTTP server]], an [[SDL]] binding and a [[GUI]] library.
* Dynamic typing
 
* Dynamic scoping
One of Factor's main goals is the to be useful for interactive and test-driven development, which is why Factor is, at its core, a safe version of Forth.
* Primary compound data types are [[linked list]]s, [[vector]]s, [[hashtable]]s, and user-defined datatypes called tuples.
* Rich math library including [[floating point]], ratios, [[complex numbers]]
* [[Continuation]]s
* Integrated [[Web server|HTTP server]]
* Focus on interactive and test-driven development
* An advanced and non-traditional [[object system]]
 
Historically, there have been two implementations of Factor: a [[Java programming language|Java]] implementation and a [[C programming language|C]] implementation. Both have an [[interpreter]] and a [[compiler]]. The Java version has been abandoned because it is much slower and less flexible than the C one.
 
==External links==
*[http://factor.sf.net Factor's website]
 
{{compu-lang-stub}}
[[Category: Programming languages]]
[[Category:Concatenative programming languages]]
[[Category:Stack-oriented programming languages]]
 
[[de:Factor]]