While the de facto .NET languages C# and Visual Basic .NET are certainly capable, only the former is especially portable (in practice, that is), and users coming from scripting backgrounds or users who don't enjoy C-style syntax may not feel at home. Fortunately, however, the Common Language Infrastructure allows support for multiple languages, and these languages can be used together as the developer sees fit. Boo is one such language for the CLI. It offers the features of the .NET Framework and Mono, and it features a Python-like syntax. In this article, we'll explore the Boo language and some of its basic features.
Boo can be obtained at:
The Boo Toolbox
Boo comes with three basic tools for working with Boo code. The first is the Boo compiler, which compiles Boo code into an assembly. It goes by the name of booc:
$ booc HelloWorld.boo
Boo Compiler version 0.7.8.2559 (CLR v2.0.50727.42)
The next tool is the Boo interpreter. Instead of compiling a Boo file, you can interpret it using booi:
$ booi HelloWorld.boo
It's also possible to interpret code directly form standard input:
$ booi -
print "Hello World!"
The final tool is the Boo interactive interpreter, booish, similar to Python's interactive interpreter. As its name implies, it allows one to interact with it, immediately seeing the results of code, among other things:
Welcome to booish, an interpreter for the boo programming language.
Running boo 0.7.8.2559 in CLR v2.0.50727.42.
The following built-in functions are available:
dir(Type): lists the members of a type
help(Type): prints detailed information about a type
load(string): evals an external boo file
globals(): returns the names of all variables known to the interpreter
getRootNamespace(): namespace navigation
Enter boo code in the prompt below.
>>> print "Hello World!"
blog comments powered by Disqus