Languages Features Creators CSV Resources Challenges Add Language
GitHub icon


Felix - Programming language

< >

Felix is a programming language created in 2001 by John Skaller.

#527on PLDB 22Years Old 819Users
0Books 0Papers

The Felix Programming Language

Example from the web:
#import <flx.flxh> fun abs_div(a:int, b:int when b!=0) expect result >=0 => abs(a/b) ; print (abs_div(2,4)); print "\n";
Example from hello-world:
println$ "Hello World";

Keywords in Felix

deref all as assert attempt call callback case caseno cclass code compound ctypes do done downto elif else endattempt endcase endif endmatch enum except exceptions expect finally for forall forget fork functor goto ident if incomplete inherit instance interface jump lambda loop match module namespace new noexpand nonterm obj of open parse raise regexp reglex regmatch rename return the then to type typecase typedef typematch typeof upto when whilst with yield

Language features

Feature Supported Token Example
Binary Literals
// 0[Bb][01_]+([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
// (0|[1-9][0-9_]*)([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
// 0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)[pP][+\-]?[0-9_]+[lLfFdD]?
// 0[xX][0-9a-fA-F_]+([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
// 0[0-7_]+([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
Strings "
"Hello world"
Print() Debugging println
// A comment
Line Comments //
// A comment
Pattern Matching
match x with
 | Some x => println$ x; 
 | None => println "NONE";
// overloads
fun f (x:double) => x +42.1;
fun f (x:int) =>  x + 1;
fun f (x:string) => x + "!";
// generics
fun g (x) => f (f x);
println$ g 1, g "hello";
println$ _map f (1,"hello",2.0);
var x = 1;
&x <- 2;
Semantic Indentation X

HackerNews discussions of Felix

title date score comments
Felix - a fast scripting language 01/04/2013 107 83
java-ee-version-history.html · felix.html · msp430.html

View source

- Build the next great programming language · Search · Day 209 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub ·