BOO 与 IronPython

发布于 2024-07-14 12:33:54 字数 199 浏览 9 评论 0原文

IronPythonBOO? 是否需要 2 种类似 Python 的语言?

What is the difference between IronPython and BOO? Is there a need for 2 Python-like languages?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

So要识趣 2024-07-21 12:33:54

IronPython 旨在成为 .NET 平台上 Python 的忠实实现。 为了兼容性,版本 1 以 Python 2.4 为目标,版本 2 以 2.5 版为目标(尽管不支持大多数以 C 实现的 Python 标准库模块)。

Boo 的既定目标是成为“CLI 的手腕友好型[动态]语言”。 它从 Python 中汲取了很多灵感,但在四个要点上存在分歧:

  1. 它是专门为充分利用 .NET 平台而设计的
  2. 设计者与 Python 语法不同,他不同意设计决策(最值得注意的是,缺乏显式自我)
  3. 该语言被明确设计为“手腕友好”——也就是说,最大限度地减少使用 Shift 键或其他多键组合的需要。
  4. Boo 默认情况下是静态类型的,但允许可选的鸭子类型。

在实现/性能方面还存在一些其他细微差别,但上述不同的设计目标应该(IMO)告诉您对语言的选择。

另外需要考虑的两件事是成熟度和社区。 Python 比 Boo 成熟得多,并且拥有更大的社区。 IronPython 也得到了 Microsoft 的明确支持。

IronPython is designed to be a faithful implementation of Python on the .NET platform. Version 1 targets Python 2.4 for compatibility, and version 2 targets version 2.5 (although most of the Python standard library modules implemented in C aren't supported).

Boo's stated aim is to be a "wrist-friendly [dynamic] language for the CLI." It takes a lot of inspiration from Python, but diverges on four main points:

  1. It's designed specifically to take good advantage of the .NET platform
  2. The designer diverges from Python syntax where he doesn't agree with the design decisions (most notably, lack of explicit self)
  3. The language is explicitly designed to be "wrist friendly" -- that is, to minimize the need for the Shift key or other multi-key combinations to be used.
  4. Boo is statically typed by default, but allows optional duck typing.

There are some other minor differences in implementation/performance, but the divergent design goals above should (IMO) inform your choice of languages.

Two more things to take into account are maturity and community. Python is much more mature than Boo, and has a much larger community. IronPython also has the explicit blessing of Microsoft.

ペ泪落弦音 2024-07-21 12:33:54

IronPython 是一种 Python 实现,而 Boo 是另一种具有 Python 式语法的语言。 一个主要区别是 Boo 默认情况下是静态类型的。

我确信还有更多差异,我只是简单地了解了 Boo,但我一直想更深入地了解(语言如此之多,时间如此之少!)。

以下是针对 Python 程序员的 Boo 陷阱列表,它很好地总结了这些差异:

IronPython is a python implementation wheras Boo is another language with a python-esque syntax. One major difference is that Boo is statically typed by default.

I'm sure there are more differences, I've only looked at Boo briefly, but I've been meaning to look at bit deeper (so many languages so little time!).

Here is a list of Boo gotchas for python programmers which sums up the differences quite nicely:

∞琼窗梦回ˉ 2024-07-21 12:33:54

IronPython 是 Python。
Boo 看起来像 Python。

他们有不同的目标,虽然 IronPython 的目标是像 Python 一样,但 Boo 却没有。 Boo 并不像 IronPython 那样担心与 Python 的兼容性......

IronPython is Python.
Boo looks like Python.

They have different goals and while IronPython aims to be just like Python, Boo does not. Boo is not worried about compatibility with Python like IronPython is...

娇纵 2024-07-21 12:33:54

简而言之,Boo 的成名之处在于它应该为您提供 Python 优雅、简洁的语法和非常高级的抽象的大部分好处,但不会牺牲 C# 等静态类型语言的(大部分)速度优势。

In a nutshell, Boo's claim to fame is that it is supposed to give you most of the benefits of Python's elegant, terse syntax and very high-level abstractions, but without sacrificing (most) of the speed advantages of a statically typed language like C#.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文