May 24

Boo

This is part 2 in a series of articles on obscure programming languages.

Boo is an object-oriented, statically-typed programming language for .NET with a Python-inspired syntax and a focus on language and compiler extensibility.  Boo is an open-source language, licensed under an MIT/BSD-style license, meaning that you can view and modify the Boo source code for both personal and commercial use.

Rodrigo Barreto de Oliveira created Boo in 2003 out of his “frustration with existing programming language systems” and his “growing love for the Common Language Infrastructure and the architectural beauty of the entire .NET framework.”

Boo features includes type inference, method generators, multi-methods, duck typing, macros, true closures, currying, and first-class functions.  As a statically-typed language that supports the .NET Common Language Infrastructure (CLI), Boo performance is similar to what you would find with C# and VB.NET.

Boo excels at scripting repetitive tasks.  Ayende @ Rahien provides a good example.  Let’s say we want to implement the singleton pattern.  We must ensure that creating the singleton is thread-safe, make the constructors private, create the static instance property, perform lazy initialization, etc.  To do this in most languages, we would follow the Singleton pattern and write fairly repetitive code.  In Boo, we can capture this pattern in a single Attribute that can be applied where needed.  Similar capabilities allow easy deployment of the disposable and observer patterns, and more advance techniques such as aspect-oriented programming (AOP).

The SharpDevelop IDE has support for Boo with an add-in.  There is an ongoing but incomplete project to support Boo in Visual Studio.  MonoDevelop has a Boo binding and interactive shell with Gtk# integration.  Most interesting is Boodle, a simple IDE for Boo that’s good for small projects.

Boo has been perpetually sub-version-1.0 and “when Boo is written in Boo, it will be dubbed version 1.0.”

“Hello, World” in Boo

print "Hello, world!"

References

Share and Enjoy:
  • Twitter
  • Facebook
  • Reddit
  • LinkedIn
  • Digg
  • DotNetKicks
  • StumbleUpon
  • Slashdot
  • Technorati
  • Google Bookmarks
  • Print
  • email

Article published on May 24, 2008




2 Responses to “Boo: Obscure Programming Language of the Month”

  1. Arjan`s World » LINKBLOG for May 25, 2008 Says:

    […] Boo: Obscure Programming Language of the Month – DevTopics ‘ Boo excels at scripting repetitive tasks ‘ […]

  2. Reflective Perspective - Chris Alcock » The Morning Brew #101 Says:

    […] Boo: Obscure Programming Language of the Month – DevTopics Obscure Programming Language of the Month series continues with a brief look at BOO – with some links to further information. […]

Leave a Reply