Boo! – Python for CLI

Rodrigo Barreto de Oliveira wanted to program using the .Net architecture and did not want to use heavy languages like C# or C++ and preferred simpler ones like Python. Out came one more programming language – Boo.

Boo is a new object oriented statically typed programming language for the Common Language Infrastructure (CLI) with a python inspired syntax and a special focus on language and compiler extensibility.

CLI is the shared-source version of CLR by Microsoft. Boo is open source and is compatible with Microsoft .Net and Mono. This means that it will be able to build cross-platform applications, as Mono can run .Net applications on non-Microsoft platforms. It is licensed under MIT/BSD style license.

Features

Boo is developed using C# and ANTLR. Lets look at some of its features:

  • Object Oriented: It supports OO programming, this will enable programmers to build more extensible and close-to-real-life applications.
  • Type Inference: Boo is a statically typed programming language. This means that the type correctness will be checked at the compile time itself, and hence increasing performance at runtime. The system used to implement this is called Type Inference. In a nutshell, type of the variable will not be explicitly declared, the compiler will infer it by the first operation on that variable. The compiler will find out type of the variable is changing because of subsequent operations and throw the corresponding error.
  • Closures: A closure is a block of code that can be passed as an argument to a function call. Closures have been dominant in Smalltalk, Lisp and now in Ruby. They simplify the code to be written and resulting in better maintenance. When compared to functions, a major difference is that they can refer to variables visible at the time they were defined.
  • Slicing: is a simple way to extract a range of elements from a container. The boo compiler supports slicing operations on lists, arrays and strings. Custom defined slicing operations are not currently supported but are planned for future.
  • Generators: are language constructs that are capable of producing more than one value when used in an iteration context. This simplifies programming syntax and requires less code to be written.

For promoting development, there are boo bindings for both – SharpDevelop and MonoDevelop.

There are other Python based languages that support .Net. Microsoft has released IronPython and Python for .Net is a package that seamlessly integrates Python with .Net. There are ways of using combinations of these – Using IronPython from Boo

Technorati tags: , , , , , , , , , , , , , , , , , , , ,

Copyright Abhijit Nadgouda
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: