我应该使用 Phobos 还是 Tango?
我决定学习 D,我想知道我应该使用哪个标准库。 我应该使用 Phobos 还是 Tango? 各自的优点和缺点是什么?
I've decided to learn D, and I'm wondering which standard library I should use. Should I use Phobos or Tango? What are the pros and cons of each?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
如果您需要使用 D2,那么您现在应该使用 Phobos,但 D2 的 tango 正在开发中。
tangobos 允许同时使用 tango 和 phobos。 在 D2 中,两者都可以一起工作,因为它们都使用单独的 druntime。
If you need to use D2 then phobos is what you should use for now but tango for D2 is in development.
tangobos allows to use tango and phobos together at the same time. In D2 both work together anyway as they both make use of the separate druntime.
Tango 目前已经过时了。 它仅适用于旧版本的 D。
在我看来,火卫一是唯一的出路。
当所有的分割库争论发生时,我并没有关注 d,但据我所知,当 D2 发布时,Tango 的很多原因都消失了。
有一个旨在复兴 Tango 的小努力,但在我看来,标准库的分裂只会伤害整个 D。
另外,除非发生一些重大事件,实际上可以保证 D 的每个版本都支持 Phobos。即使 Tango 成功移植到 D2,它也很容易再次被放弃。
Tango is currently outdated. It only works with the old version of D.
In my opinion, Phobos is the only way forward.
I wasn't following d when all of the split library arguments were going on, but from what I can tell, a lot of the reasons for Tango disappeared when D2 was released.
There is a small effort aimed at reviving Tango, but in my opinion having a split in the standard library only hurts D as a whole.
Also barring some major event, Phobos is virtually guaranteed to be supported on every release of D. Even if Tango gets ported to D2 successfully, it could easily be abandoned again.
探戈。 它在适当的情况下更加面向对象,它包括容器(如 STL 或 Java Collections),它有一个活跃的开发团队,它有更多的动力(它可能很快就会被纳入官方编译器),并且它有真正的文档,包括 < a href="http://www.apress.com/book/view/1590599608" rel="noreferrer">用 D 学习 Tango。
看起来 Tango 可能很快就会被纳入 Walter 的发行版本中。
Tango. It's more object-oriented where appropriate, it includes containers (like STL or Java Collections), it's got an active development team, it has more momentum (it may soon be incorporated into the official compiler), and it's got real documentation, including Learn to Tango with D.
It looks like Tango may soon be incorporated into Walter's releases.
我对这两者都没有什么经验(有点..)
Phobos 更扁平,更像 python,但相当不完整。
Tango 更像 Java,它让简单的事情变得复杂。
我个人更喜欢使用phobos,除非你需要一个依赖于Tango的库(例如DWT)。
I've had little experience with both (kinda ..)
Phobos is more flat and python-like, but quite incomplete.
Tango is more Java-like, it makes simple things complicated.
I personally prefer to go with phobos, unless you need a library that depends on Tango (such as DWT).
来自消除常见的 D 神话:
From Dispelling Common D Myths:
Phobos 1* 与 Tango
Phobos 1* vs Tango
如果您使用 D2,请使用 Phobos
如果您使用 D1,请使用 Tango。
而且你必须学习D2,所以使用Phobos。 容易,不是吗?
注意:D2 的 Phobos 比 D1 的更强大、更大。
If you use D2, use Phobos
If you use D1, use Tango.
And you must learn D2, so use Phobos. Easy, not ?
Note : Phobos for D2 it's much powerfull and bigger that for D1.
在我看来(从未实际使用过Boost),Tango 更像Boost,而Phobos 更优雅。 如上所述,使用 Phobos 很像 Python。
In my opinion, (having never actually used Boost), Tango is more like Boost, and Phobos is more elegant. As was stated above, using Phobos is much like Python.