Fun is a minimal functional programming language that runs on the ecosystem of Golang. Its syntax is similar to that of Standard ML.
Programming should be fun
- Easy to learn
- Fun to program
- Minimal design, less is more
- Be practical
why?
A pure language is good for research, but an industrial language has to be practical to be widely used.- Expressive
- Programming in the large scale
Proof of Concept
- Lexical analysis
- Parsing
- Semantics analysis
- Rename identifiers
- Semantics checks
- Type system
- Parametric polymorphism
- Type inference
- Infix op expression
- Type variables in arithmetic expressions
- Function application
- If-then-else
- Fn (lambda) expression
- Let-in expression
- Tuples
- Sequence
- Patterns
- Constant pattern
- Var pattern
- Tuple pattern
- Type annotation
- Infix op expression
- Record
- Data type
- Built-in types
- List
- Ref
- Option
- Subtyping (structural subtyping)
- Code generation
- Go ast
- Module
- Import statement
- Export annotation (or keyword)
- Package & Distribution
- Package declaration
- Import map
- Go packages interoperability
- Go types mapping
- Call Go functions
- Call Go methods
The lexer is derived from that of GoCaml.