Introducing Boo

Welcome to BooHaunt, and welcome to Boo. If you are looking for a language that allows you to type less, increase productivity, and speak in a language humans are more accustomed to, then Boo is a good choice of language. With its extensibility and easy syntax, Boo offers a more frictionless programming experience.

Where Boo Comes From

Boo is a language in the .NET family which includes C#, VB.NET, and many other languages.1) It was originally conceived of by Rodrigo Barreta de Oliviera around 2004 out of a need for a different kind of language.

Unlike many languages that derive from some other language, Boo is more of a fusion of ideas from multiple languages.2) Taking syntactic concepts from Python while utilizing the OOP aspects of C# and throwing in the extensibility of languages such as Ruby, Boo looked to fill a niche in the community. While Python offers an easy syntax that was free of cruft, it is at times slower than its compiled cousins and lacks the safety net of static-typing. On the other hand, C# and .NET offer an entire framework of libraries and easy interop with legacy binaries, but at the cost of repetition, excessive typing, and a strict syntax. Ruby, an emergent language at the time, brought extensibility to the party, but, similar to Python, was dynamically-typed and thus incurs overhead at runtime.

Boo was brought up with an eye towards these benefits and limitations. Boo uses a Pythonic syntax that is simple yet powerful. It also compiles into CIL, the .NET equivalent of bytecode in Java, making it fully interoperable with the likes of C# and VB.NET. It also reduces the burden of writing a program in .NET by allowing for certain common transformations to be done automatically. For example, with C#, the ‘Hello World!’ application is verbose:

using System;
 
public class Program
{
  private static void Main()
  {
    Console.WriteLine("Hello World!");
  }
}

Whereas in Boo it is surprisingly compact for the same expressiveness:

print 'Hello World!'

Clearly, though, if you are willing to sacrifice a bit more time for C#, you can do just the same things you could in Boo, but the factor that sets it clearly apart from other languages is to open up the compiler infrastructure, providing benefits that C# cannot.

Boo—The Transparent Compiler

Boo is not just the language; Boo is also the compiler that transforms the source into machine code. In most languages, there is no distinction. Code gets written, shoved into the black box of the compiler, and out comes some executable or library. Sure, with gcc or gmcs you could go in and edit the source of the compiler, then compile the compiler and use your modified compiler, but this type of modification is not a part of the normal use of the language.

This is not so in Boo. Boo offers a number of hooks into which a user can put their hands into the grease of the compiler. Source code is parsed into an Abstract Syntax Tree, after which the user is able to perform numerous transformations including those that the compiler normally performs. The Boo compiler then also takes care of wrapping up the abstract code into an assembly, and you get the finished product. The difference is akin to buying a new car from a dealer and having it delivered (C#, VB.NET, et al.) versus going to the factory and tossing in a couple of custom modifications and watching the car as it rolls of the line (Boo). With the Boo compiler, the process is completely transparent and you can jump in at nearly any step.

1) IronRuby, IronPython, F#, and Nemerle are other examples.
2) Check out the Boo Manifesto, written by the creator of Boo, for a more detailed look at the language’s beginnings.
 
primer/introducing_boo.txt · Last modified: 2008/06/26 23:53 by neoeinstein
 
Ohloh project report for Boo Programming Language
Recent changes RSS feed Content licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License Donate Valid XHTML 1.0 Valid CSS Driven by DokuWiki Free SSL Secured By StartCom