Work on the Microsoft-friendly open-source Boo language is nearing completion.
Boo is a new object-oriented statically typed programming language for the Microsoft CLI (Common Language Infrastructure) with a Python inspired syntax and a special focus on language and compiler extensibility, said Rodrigo Barreto de Oliveira, the creator of the language.
As an open-source language that targets Microsoft technology, Boo joins an increasing number of open source projects that are Microsoft-friendly.
De Oliveira said a 1.0 release of Boo is about three to six months away.
“I would say we are three to six months away from a 1.0 release, not because of the workload but mainly because of the time it will take to get more .Net [Framework] 2 users and applications to really test the tools.”
Moreover, “For the 1.0 release, our goal is to have: generics; a better way to define and use macros; better, friendlier command line tools; and all the crash bugs listed on our roadmap fixed,” de Oliveira said.
De Oliveira, who is based in Assis, Brazil, said he created Boo because nothing like it existed and he wanted a Python-like language he could use on a project he was working on.
“Boo was born out of my frustration with existing programming language systems and my growing love for the Common Language Infrastructure and the architectural beauty of the entire .net Framework,” de Oliveira wrote in a description of the Boo language, referred to as the Boo Manifesto.
“I was frustrated mainly because I could not use the language I wanted to use (Python at the time) to build the kind of systems I needed to within the technological framework my company has settled on,” de Oliveira said.
“I had two options: I could either use a different framework (such as the Python standard libraries and runtime environment) or a different programming language (C# was the logical choice for such a longtime C++ programmer like myself).”
However, “I tried both and was completely satisfied by none,” he said.
“When I was programming in full Python mode I missed some of the things Id normally get from a more statically typed environment, such as compile time error checking…,” de Oliveira said.
“But what I missed most was the well thought out .Net architecture and its great support for Unicode, globalization and Web style applications.”
When the Python attempt failed, de Oliveira said he switched to C# and “started coding like hell…by that I mean no Christmas or Carnival or six-hour sleep nights.”
But, de Oliveira, who works as a contractor for db4objects Inc., said he delivered on the project. Still he was not satisfied.
“…I was stressed and couldnt avoid those mixed feelings about C# in light of my previous Python experience,” he said.
De Oliveira said he missed the “wrist-friendly Python syntax and the ability to easily test my own ideas with running code. And I wanted more. I wanted a language I could extend with my own constructs. I wanted a compiler system that could be taught new things—taught how to automagically generate common code for me…”
And, added de Oliveira: “Being such a hard case of not-invented-here syndrome it all became clear to me: I had to build a new programming language system for the CLI… One that could be used, extended and modified by developers according to their specific needs. I had to build Boo.”
Targeting the CLI
Miguel de Icaza, Novell Inc.s vice president of developer platforms, and founder of the Mono project, which is an open-source development effort to build an implementation of .Net for Linux and other platforms, is big on Boo, as it targets the CLI.
Mono implements the CLI. The CLI is the shared-source version of Microsofts CLR (Common Language Runtime).
Said de Icaza of Boo: “It is a language that borrows some ideas from scripting languages like Python and Icon, but is designed to take advantage of .NET. This makes it a good language for prototyping and testing .NET class libraries with minimal setup.”
In addition, he said, “A nice side implementation detail of Boo is that it exposes enough of its internals that its easy to host it on an IDE [integrated development environment] and provide some IDE features that would have otherwise been too hard to write.”
De Oliveira said it took him about eight months of working on Boo, “before I got to a point where I felt OK to make it public. For a time I was working only part time on my day job while having the rest of day for hacking on boo. That was fun.”
He said he considered using the Ruby scripting language to write the first prototype of Boo, “because I was investigating the language at the time but ended up writing it in my beloved python using a Toy Parser Generator generated parser and the Python.NET bridge to read the metadata from .Net assemblies.”
Meanwhile, he said the second version of the prototype “was a complete rewrite in C# using ANTLR [ANother Tool for Language Recognition] for the parser and the System.Reflection.Emit .NET API which made things simpler.”
And, “the first public version is what I consider to be the third version of boo after a major restructure of the type system,” he said.
Boo supports duck typing. Duck typing is a term for the dynamic type system of some programming languages, where a variable value itself determines what it can do.
It also implies that as long as an object implements a certain interface, it is interchangeable with any other object that implements the same interface.
The premise is that if it walks like a duck, and talks like a duck, then it might as well be a duck.
As de Oliveira noted, other Python-based languages that support .Net exist.
Python for .NET is a package that gives Python programmers nearly seamless integration with the .Net Common Language Runtime and provides a powerful application scripting tool for .Net developers.
Meanwhile, Microsofts IronPython is a pure managed-code implementation of the Python language.
Microsoft describes IronPython as the code-name for a beta release of the Python programming language for the .Net platform.
Moreover, it supports an interactive interpreter with fully dynamic compilation. It is well integrated with the rest of the framework and makes all .Net libraries easily available to Python programmers, the company said.
Microsoft released beta 3 of IronPython 1.0 on Feb. 15.
IronPython is covered under Microsofts Shared Source license, and Boo is covered under an MIT/BSD (Massachusetts Institute of Technology/Berkeley Software Distribution) style license.