26

After having looked at each of these two projects, it seems that both are VERY similar. Both run on top of the CLI, both have python style syntax, both use .NET instead of the standard python libraries.

So, what are the differences between them and advantages of each?

Matthew Scharley
  • 127,823
  • 52
  • 194
  • 222

7 Answers7

25

The main difference as I see it is that Boo is statically typed, meaning the type of a variable is inferred on its first assignment and is fixed from there - while IronPython has the "real" dynamic behaviour of normal Python code.

IronPython is officially maintained by Microsoft now and targets the new Dynamic Language Runtime in version 2.0. I suspect because of it's statically typed nature Boo might be faster. I don't have much "real" experience with that though ...

IronPython also reimplements lots of the python standard library so you can run lots of python software without change on IronPython (e.g. Django).

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
VolkA
  • 34,983
  • 7
  • 37
  • 37
  • 11
    Historical correction, in case someone else finds this as a top hit comparing Boo and IronPython and somehow missed the news - IronPython and IronRuby are no longer official Microsoft projects as of some fuzzy time around August 2010. Jim Hugunin left in October 2010. – Andy Dent Mar 12 '11 at 08:41
14

Boo is statically typed, but has optional duck typing (which works fairly well, in my experience). Boo is also specifically designed to be "wrist friendly" -- in other words, to minimize the need to use Shift-key combinations. It has good IDE support in SharpDevelop.

As is pretty evident, Boo takes a lot of inspiration from Python, but is also designed to take good advantage of .NET features.

Performance-wise, Boo feels marginally faster than IronPython, and in particular lacks the noticeable startup lag of IronPython.

Boo is still an immature language, and lacks the community of Python. I'd personally be a bit wary about using it in production. Also, I don't agree with all the departures it's made from Python, such as getting rid of explicit self in classes.

Ryan Ginstrom
  • 13,915
  • 5
  • 45
  • 60
  • 1
    I never liked the explicit `self` in Python...what are the advantages of it? (I'm genuinely curious) – mpen Feb 28 '12 at 05:20
  • 1
    Explicit self -- the main things are lack of magic and surprises. It also lets you do slightly evil but cool things like `SomeClass.some_method(arbitrary_object_instead_of_self)` – Ryan Ginstrom Apr 17 '12 at 06:31
11

I haven't used IronPython yet, but here's what I know about Boo...

  • Boo was inspired by Python and has many syntatic similarities. For differences, see http://boo.codehaus.org/Gotchas+for+Python+Users
  • Boo was written specifically for the CLR
  • It is statically typed, which has several benefits
    • It can be compiled to a DLL and referenced by VB and C# projects
    • you get code-completion in IDEs
  • The language itself if extensible. You can write "syntactic macros" and actually add new elements to the language. This makes it a good candidate for writing DSLs.
  • It is not yet at 1.0 yet, while IronPython is. The language is still going through growing pains, but is still very usable.

I've used Boo for things like:

  • Scripting scheduled jobs. It's a great alternative to VBScript, BAT files, especially if accessing .NET APIs. Since then I mostly switched to Powershell, but it's OS-specific, and has a heavier syntax, so I still use Boo for some stuff.
  • Writing Unit Tests
  • Embedded scripting language
Winston Fassett
  • 3,500
  • 3
  • 36
  • 29
  • You can call IronPython functions and such inside a C# program as well: http://blogs.msdn.com/b/charlie/archive/2009/10/25/hosting-ironpython-in-a-c-4-0-program.aspx – mpen Feb 28 '12 at 05:42
4

I have written applications in both Boo and IronPython. For me IronPython has been the more robust choice and much of what I've written in CPython ports without changes. All recent projects have been pure IronPython if targeted for .Net Framework.

Since Jim "defected" to Microsoft, IronPython has been elevated to a top tier language. There's even Visual Studio for it.

CyberFonic
  • 3,957
  • 1
  • 21
  • 21
1

I agree with VolkA here. Being able to run Django is big. It's just such an amazing framework, that Boo will have a hard time redoing it. Today it's more a question of the frameworks that a language provides, than it is the construct that it provides. And Boo doesn't provide much improvements over Python in the constructs it support.

Anders Rune Jensen
  • 3,758
  • 2
  • 42
  • 53
  • Except that a) it runs on .NET, and b) it runs on .NET. Personally, as a primarily C# user, that in itself is a huge thing. I've been toying with Python, and I like it as a language, but relearning a library structure just to use it isn't my idea of fun. – Matthew Scharley Oct 11 '08 at 13:01
  • You can use IronPython on .NET as well. – Anders Rune Jensen Nov 18 '08 at 12:47
0

The main difference, in my opinion, is that IronPython is an implementation of a mature language - while Boo is younger and less known.

gimel
  • 83,368
  • 10
  • 76
  • 104