Re: wikipedia draft

new topic     » goto parent     » topic index » view thread      » older message » newer message

Draft: The Phix Programming Language

Phix is a programming language created by Pete Lomax, of London England. Phix is designed with simplicity, compactness, and orthogonality--to provide a performant language that is easy to learn and program.


Robert Craig wrote a Master's thesis at the University of Toronto influenced by the work of John Backus on FP ( functional programming ) languages. He then created a working language, for the Atari Mega-ST, to demonstrate these ideas. The Euphoria programming language was later released for the DOS platform in July 1993 under a proprietary licence. Euphoria was written in the C language and provides an interpreter (for running source code immediately), and a translator generating C source code (for compiling programs with GNU or Watcom compilers).

In 2006, Pete Lomax created Phix as clone of Euphoria, but written in assembly language. Phix is self-hosting and can re-compile itself. The single Phix executable can both interpret and compile source code.

Phix 8.1, released in March 2020, added structs and classes to permit the object-oriented programming style.


Phix is suitable for educational, general, high-level scripting, and text processing. Phix is available for Linux and Windows platforms and in 32 bit and 64 bit versions.

Simplicity, minimalism, and orthogonality are achieved through:

  • two distinct data-types
  • free form syntax with English keywords
  • generic routines and operators

The Art of Unix Programming states "Compactness is the property that a design can fit inside a human being's head." Phix is a compact language and thus easy to learn and program. The cognitive load needed to learn and use Phix is reduced. For example it is easier to remember that the Phix & operator concatenates all values, and the + operator adds all values. Some languages are contrary: the & operator concatenates numbers (but not strings), and the + operator concatenates strings (but not numbers).

Source code safety is ensured by:

  • data type checking
  • enforcing subscript bounds
  • variables must be declared and explicitly assigned values
  • argument are passing by-value (but with the efficiency of copy-on-write)
  • lack of pointers

The Phix developer is provided with:

  • human readable error messages
  • automatic memory management
  • garbage collection
  • interpretation and compilation of source code
  • gui libraries based on IUP and GTK
  • a standard library that includes features like: ipc, json, curl, zip, gmp, regular expressions, sockets, and unit testing
  • debugger and execution profiler

Examples and Syntax

[ to be developed ]


Paradigms: imperative, procedural, object-oriented

Standardized: No, the manual includes language specification

Type strength: strong

Type safety: safe

Expression of types: explicit, partially implicit

Type compatibility: duck

Type checking: dynamic, static

Parameter Passing Methods Available: copy on write, immutable reference, multiple returns

Garbage collection: Reference counting

Intended use: Application, Educational, General, High-level scripting, Text processing

Design goals: Simplicity, Readability, Ease of use

Execution modes


Comparable languages



"pGUI documentation". Retrieved 2020-12-31. 
"IUP". Retrieved 2020-12-31. 
"Phix and GTK example". Retrieved 2020-12-31. 
"GTK". Retrieved 2020-12-31. 
"PCAN/interfaces". Retrieved 2020-12-31. 
"database documentation". Retrieved 2020-12-31. 
    "other databases". Retrieved 2020-12-31. 

External links

Free downloads of Phix. 
    Official website Phix 
    PCAN - Phix Contributions & Assorted Nicknacks 
    openEuphoria Forum 
    Phix ยท GitHub Development repositories. 
    Discussion on ycombinator 
    Hacker News on facebook link 
    Discussion of differences with Euphoria 
    How to implement a program for History variables in Phix 
    Learn To Phix Programming by Tom Ciplijauskas 
    Phix Tutorial: Basic Sequence Actions, also by Tom, with some discussion 
    Phix Tutorial: Basic Sequence Operations, also by Tom, with some discussion 

Programming languages implemented in Phix

    Phixmonti and Klingphix (spanish) see also Phixmonti and Klingphix on rosettacode 

Category:Procedural programming languages  
Category:Cross-platform software  
Category:Programming languages created in 2006  
Category:Free educational software 

new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu