Boo vs. IronPython

后端 未结 7 751
情歌与酒
情歌与酒 2020-12-30 22:18

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 t

相关标签:
7条回答
  • 2020-12-30 22:23

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

    0 讨论(0)
  • 2020-12-30 22:28

    Like Winston said, Boo is very extensible due to its open compiler architecture, take a look at these examples:

    • http://ayende.com/Blog/archive/2008/05/27/The-magic-of-boo--Flexible-syntax.aspx
    • http://www.infoq.com/articles/dsl-on-the-clr
    • http://ayende.com/Blog/archive/2007/12/21/Meta-Methods.aspx
    • http://ayende.com/Blog/archive/2007/11/24/Domain-Specific-Language-Losing-the-original-language.aspx
    • http://ayende.com/Blog/archive/2007/10/14/By-the-DSL-guess-what-I-am-reading.aspx
    • http://ayende.com/Blog/archive/2007/10/04/Redefining-If.aspx
    • http://ayende.com/Blog/archive/2007/09/21/Playing-with-Boos-DSLs.aspx
    0 讨论(0)
  • 2020-12-30 22:33

    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).

    0 讨论(0)
  • 2020-12-30 22:34

    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.

    0 讨论(0)
  • 2020-12-30 22:35

    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.

    0 讨论(0)
  • 2020-12-30 22:38

    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
    0 讨论(0)
提交回复
热议问题