archives

ZenScript, A new open-source language project.

I have decided to start a new open source (and open design) language project (working title "ZenScript") collaborating with shelby3 in GitHub, focusing on compile to JavaScript which will allow rapid prototyping and experimenting with features. The target is a strongly typed language targeted at generic programming as defined in "Elements of Programming" by Alexander Stepanov and Paul McJones, but in a garbage collected language, with some features like first class union types aimed at delivering concise code and eliminating boilerplate, and which enables a neat solution to Wadler's Expression Problem which I first heard from shelby3.

The idea is it will be a small single-paradigm language, a hybrid between functional / imperative.

The key features for the language:

  • Parametric polymorphism
  • Type classes
  • Union types
  • Type inference locally (within a module)
  • Python like compulsory indenting/layout
  • Sound type system

Additional features that would be good but not decided:

  • Type system is a logic language and can be used for metaprogramming
  • Unified type-class, record, and module syntax
  • Monadic effects
  • Higher ranked types (probably via first-class-polymorphism)
  • Higher kinded types
  • Type families

Here is a link to the discussions about the language: https://github.com/keean/zenscript/issues

All are welcome to come and comment and help shape the direction of the language. You don't have to contribute code, just helping with the design discussions would be appreciated (but please take note of the goals above).

There are the beginnings of a compiler, currently written in JavaScript (seemed appropriate), which is being developed using a test-driven-development methodology (mocha and chai for the unit test framework, and jshint to keep things clean). I am using the Parsimmon parser (inspired by Parsec). It will use a nano-pass architecture as correctness, and understandability more than performance are the first goals. Currently it can just about take a simple expression from the source language to AST and back to JavaScipt, but the language design is still in the early stages too.