面向对象的TCL

发布于 2024-07-22 16:38:07 字数 26 浏览 5 评论 0原文

TCL 中哪种面向对象系统被视为标准?

Which object oriented system in TCL is considered the standard?

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

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

发布评论

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

评论(5

萌辣 2024-07-29 16:38:07

Tcl 中包含的对象系统实际上是一个 oo 框架。 虽然可以直接使用它,但它的目标是成为可以在其上构建其他面向对象系统的框架。 Nathan 提供的链接中提到了 Tcl 最广为人知的三个对象系统(itcl、xotcl、snit)。

我使用过itcl,如果你习惯C/C++/Java/等的话,它非常容易使用。

我发现 XOTcl 使用起来有点烦人,但很多人喜欢它的强大功能,所以对此持保留态度。

Snit 是一个纯粹的 tcl OO 系统(包含在 tcllib 中,因此很容易获得并包含在任何包含 dist 的电池中)

简短摘要:本身没有标准。 如果您想要无论您走到哪里都可以使用并最有可能安装的东西,那么 Snit 可能是最佳选择。

The object system being included with Tcl is, in effect, an oo framework. While it's possible to work directly with it, it's goal is to be the framework upon which other OO systems can be built on top of. The three object systems which are probably most widely known for Tcl (itcl, xotcl, snit) are all mentioned in the link provided by Nathan.

I've worked with itcl, and it's very easy to use if you're used to C/C++/Java/etc.

I found XOTcl to be a little annoying to work with, but many people love it for it's power so take that with a grain of salt.

Snit is a pure tcl OO system (included in tcllib and, hence, easy to get and included in any batteries included dist)

Short summary: There isn't a standard, per se. If you want something you can use with the best likelihood of being installed no matter where you go, then Snit is likely the best choice.

再可℃爱ぅ一点好了 2024-07-29 16:38:07

Tcl 8.6 内置了 TclOO(它源自许多其他 OO 系统)和一个 [incr Tcl] 版本作为贡献的扩展包。 虽然我预计人们最终会转向 TclOO 来满足他们的大部分需求,但 Tcl 程序员作为一个群体往往不喜欢对工作系统进行太多修改,因此通常不会那么快地采用新功能。

Tcl 8.6 comes with TclOO built in (which derives from rather a lot of other OO systems) and a version of [incr Tcl] as a contributed extension package. While I anticipate that people will move eventually to TclOO for most of their needs, Tcl programmers as a group tend to prefer not tinkering too much with working systems and so don't usually adopt new features all that rapidly.

怀中猫帐中妖 2024-07-29 16:38:07

查看 Tcl Wiki 以获得 Tcl OO 系统的完整列表。 看起来人们投票赞成将 Incr Tcl 合并到 Tcl 核心中,这告诉我 Incr Tcl 非常接近标准。 虽然核心的oo系统是基于其他oo语言的,但我相信命名空间系统是源自Incr Tcl。

http://www.tcl.tk/cgi-bin/tct/tip/ 50

Take a look at the Tcl Wiki for a complete listing of the OO systems for Tcl. It looks like folks voted on incorporating Incr Tcl into the Tcl core, which tells me Incr Tcl was pretty close to being standard. While, the oo system in the core is based on other oo languages, I believe the namespace system was derived from Incr Tcl.

http://www.tcl.tk/cgi-bin/tct/tip/50

违心° 2024-07-29 16:38:07

Tcl 似乎还没有一个单独的对象系统能够成为标准,但是 XOTcl 和 Snit 非常接近; 8.6 版本中添加到核心的对象系统基于它们(请参阅此处 )。

There doesn't seem to be a single object system for Tcl which stands out as the standard yet, but XOTcl and Snit are pretty close; the object system being added to the core in version 8.6 is based on them (see here).

明媚殇 2024-07-29 16:38:07

Tcl8.6内部有TclOO包。 iTcl 已经对此有了新的实现。 TclOO 为 iTcl 等其他包提供了 OO 架构/机制,它不应该直接在代码中使用。

Tcl8.6 has TclOO package internal. iTcl has aready a new implementation upon this. TclOO supplies a OO arch/mechanism for other packages like iTcl, it should not be used directly in your code.

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