Factor (programming language): Difference between revisions

Content deleted Content added
LittleDan (talk | contribs)
various changes
Line 1:
'''Factor''' is a [[concatenative programming language]] designedwhose design and implementedimplementation is led by [[Slava Pestov]]. Factor's main influences are [[Joy programming language|Joy]], [[Forth programming language|Forth]], and [[Lisp programming language|Lisp]], with minoradditional influence from [[Self programming language|Self]].
 
Like other concatenative languages, Factor has a [[reverse Polish notation|postfix]] syntax, meaning that you write the arguments of a function before the function name. As an example, [[Hello world]] in Factor is
"Hello world" print
 
Factor is dynamically [[datatype|typed]], and a unique [[Object-oriented programming|object]] system accompanies it. In Factor, there areis morea thansmall 20group of base types, and users and the standard library can make their own datatypesclasses using tuples and other mechansims. There is no [[Inheritance (computer science)|inheritance]], but there is [[Delegation (programming)|delegation]] as in Self. Additionally, there are other ways to make [[Class (computer science)|class]]es other than types or tuples; Factor supports [[predicate class]]es and union classes. Factor's integratedbuilt-in compound datatypes include [[linkedfixed list]]s,and variable length [[array|vector]]s and [[hash table|hashtables]]. The language also supports [[floating point]], ratiosand arbitrary precision integers. Linked lists, [[complex numbers]] and arbitraryfractions precisionare integersimplemented in the standard library.
 
Factor was originally only interpreted, but it can now also be compiled. The compiler is written entirely in Factor, and it does not output standalone executables but rather merely a faster image.
When using the stack system does not suffice, dynamic [[scope (programming)|scoping]] is a supported alternative. Factor has a growing library which supports [[continuation]]s, an [[Web server|HTTP server]], an [[Simple_DirectMedia_Layer|SDL]] binding and a [[GUI]] library.
 
When using the stack system does not suffice, dynamic [[scope (programming)|scoping]] is a supported alternative. Factor has a growing library which supports [[continuation]]s, an [[Web server|HTTP server]] and accompanying web framework, an [[Simple_DirectMedia_Layer|SDLOpenGL]] binding and, a [[GUI]] library, an [[XML]] parser, and several other utilities.
One of Factor's main goals is to be useful for interactive and [[test-driven development]], which is why Factor is, at its core, a safe version of Forth.
 
One of Factor's main goals is to be useful for interactive and [[test-driven development]], which is why Factor is, at its core, a safe version of Forth. Factor is dynamically typed, but the compiler assesses the stack depth of words (functions).
So far, both [[Java programming language|Java]] and [[C programming language|C]] implementations have been constructed (the Java implementation is deprecated).
 
So far, both [[Java programming language|Java]] and [[C programming language|C]] implementations have been constructed. (theThe Java implementation is deprecated) and no longer maintained. The native runtime of the C version is continually shrinking as an increasing proportion of Factor is self-hosted. However, there will likely always be a portion of Factor written in C.
 
Though Factor does not adhere to an external standard the way C does, the language is heavily documented.
 
==External links==
*[http://factorcode.org/ Factor's website]
*[https://lists.sourceforge.net/lists/listinfo/factor-talk Factor mailing list]
*[http://www.ircbrowse.com/cdates.html?channel=concatenative Logs of #conatenative] on [[FreeNode]], a channel which mainly discusses Factor
 
[[Category:Programming languages]]