Boo vs. IronPython
Asked Answered
I

7

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?

Inanna answered 11/10, 2008 at 8:44 Comment(0)
K
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).

Kial answered 11/10, 2008 at 9:30 Comment(1)
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.Xuanxunit
U
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.

Ulcerative answered 13/10, 2008 at 14:4 Comment(2)
I never liked the explicit self in Python...what are the advantages of it? (I'm genuinely curious)Petrology
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)Ulcerative
R
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
Randellrandene answered 24/10, 2008 at 3:27 Comment(1)
You can call IronPython functions and such inside a C# program as well: blogs.msdn.com/b/charlie/archive/2009/10/25/…Petrology
E
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.

Erroneous answered 13/10, 2008 at 22:23 Comment(0)
Y
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.

Yoheaveho answered 11/10, 2008 at 12:47 Comment(2)
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.Inanna
You can use IronPython on .NET as well.Yoheaveho
S
0

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

Sulfate answered 11/10, 2008 at 10:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.