Skip to content

Latest commit

 

History

History
67 lines (56 loc) · 1.53 KB

ReadMe.md

File metadata and controls

67 lines (56 loc) · 1.53 KB

Introduction

Fun is a minimal functional programming language that runs on the ecosystem of Golang. Its syntax is similar to that of Standard ML.

Motto

Programming should be fun

Goals

  • 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

Status

Proof of Concept

Features

  • 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
    • 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

Credits

The lexer is derived from that of GoCaml.