Boo (programming language)

This is an old revision of this page, as edited by WPWoodJr (talk | contribs) at 15:31, 9 November 2004 (added type inference as a feature). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Boo is a new, object oriented, statically typed, programming language for the Common Language Infrastructure with a Python inspired syntax and a special focus on language and compiler extensibility. Some features of note include type inference, generators, multimethods, optional duck typing, macros, true closures, currying, and first class functions.

Boo is open source licensed under an MIT/BSD style license.

Code samples

Hello world program:

print("Hello, world!")

Fibonacci series generator function:

def fib():
    a as long, b as long = 0, 1
    while true:
        yield b
        a, b = b, a + b

Asynchronous design pattern with a closure:

import System

def run():
    print("executing")

print("started")
result = run.BeginInvoke({ print("called back") })
System.Threading.Thread.Sleep(50ms)
run.EndInvoke(result)

print("done")

Currying:

plusX = { a as int | return { b as int | return a + b }}

print plusX(3)(4)