by Koichi Nakamura
High-level programming language with self-extension.

Amber is an open source scripting language, which is being developed for easy realization of High-Level Programming with Self-Extension. The term "self-extension" means a way to extend languages' syntaxes or semantics using capabilities of themselves, and it includes following techniques:

  • Macros
  • Domain Specific Languages (DSLs)
  • Extensible Syntax
  • Symbolic-Programming and Eval
  • Dynamic and Static Reflection

Writing programs with high-level abstraction is very important in terms of productivity, portability and performance. Since the optimal programming language is different according to programming targets in general, capabilities of self-extension are also important. Amber has been designed and developed placing the highest priority to self-extension from the start, so self-extension of Amber is easy and has high-degree of freedom.

f() := {
    n := 1
    return () -> {
        m := 2
        return () -> {
            n += m
        }
    }
}
g := f()
h1 := g()
h2 := g()

# h1 and h2 share `n'

puts(h1())  #  => 3
puts(h2())  #  => 5
Information updated 08/28/15
View Comments