Introduction to Welly

Welly is an experimental programming language that attempts to combine the good parts of existing languages with hindsight and conceptual economy.

Project goals

Welly explores co-optimisation of a safe high-level language, a garbage-collected virtual machine, and a JIT compiler. It falls somewhere between C, Java, Python and OCaml, both in terms of its motivations and the techniques it uses.

The purpose of Welly is to demonstrate that it is possible to provide all of the following desirable features in one language:

  • Rapid development
  • Safety for large programs
  • Ease for beginners
  • Resource efficiency
  • Platform integration
  • C-family syntax and types

Read more about the project goals.

Examples

No annoying boilerplate:

>>>> print("Hello, world!\n")
Hello, world!

Strong static type-checking:

>>>> fn bottles(n: int) {
....     return n + " green bottle" + (n==1 ? "" : "s")
.... }
StaticMessageVMError: binary operator "+" is not defined for (int, str)
at line 7, col 14
    return n + " green bottle" + (n==1 ? "" : "s")
             ^

Algebraic types with exhaustivity checking:

>>>> union str_option {NONE; SOME(str)}
>>>> 
>>>> fn p(x: str_option) {
....     switch x {
....         case SOME(s) { print(s) }
....     }
.... }
InexhaustiveSwitchVMError: case 'NONE' is not handled
at line 7, col 5
    switch x {
    ^^^^^^

Read the Tutorial.

Status

Do not use Welly for anything important.

Welly is experimental, immature, and unfinished. We reserve the right to change anything, without warning. This situation will persist as long as the version number begins with a zero, which will be several more years.

Please note that many of the project goals have not yet been achieved. Welly is a work in progress. Welly has been in active development since about 2005 but is not yet finished.

Welly is currently mocked-up inside Python. This makes it very slow and memory hungry. There is no JIT compiler yet, and the garbage collector is Python's. Some of the primitive datatypes are Python's too, including integers and strings. Several language constructs are missing. Several parts of the virtual machine are place-holders. We've so far made no effort to optimise the code. Moreover, much of this web-site is in note form.

Download and contribute

You can download Welly for free. Please do explore it and tell us what you think.

Welly is made available to you under a 2-clause BSD license and a patent grant. Welly does not have a public source control repository. We nonetheless welcome fixes and suggestions that are consistent with our project goals (and license and patent grant) and with simplicity.

This website is on GitHub (https://github.com/wellylang/wellylang.org) and is gradually improving. We welcome contributions.