Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Another OOP question - STOOOP vs OOP in the core

29 views
Skip to first unread message

BlueFox

unread,
Aug 5, 2009, 9:32:25 PM8/5/09
to
I finally have a reason to use, or at least think about using, OOP in
Tcl. If I understand the Tcl roadmap OOP will be added into the core
at some point in the future. My question is, if I use STOOP in Tcllib
will it be similar to the OOP that will be built into the core?

APN

unread,
Aug 6, 2009, 4:11:41 AM8/6/09
to

OO in the core is already here. It is included in the Tcl 8.6 betas
and you can use it with 8.5 with an external extension.

/Ashok

dkf

unread,
Aug 6, 2009, 4:31:34 AM8/6/09
to

The core's OO isn't stooop (remember, there are three 'o's in it) but
rather has more in common with [incr Tcl] and XOTcl. As stooop is
purely scripted, it will continue to be supported (by the tcllib
maintainers) but it's not the focus of any development that I'm aware
of. It's also much slower than core OO (or itcl or xotcl) when using
virtual methods; with the core OO system, virtual methods with a
complex inheritance hierarchy are almost as fast as direct procedure
calls. Which is neat.

So in short, use stooop if you want but it's not an area that is going
to get a lot of work from the rest of us. (And as APN mentions, you
can try out the core OO today by getting the TclOO package and loading
it into a Tcl 8.5 interpreter, or trying out the beta of 8.6.
ActiveTcl is a good way to do either.)

Donal.

Larry W. Virden

unread,
Aug 6, 2009, 8:01:12 AM8/6/09
to

If you make use of Tcl 8.6, you can actually do work in either the
minimalistic TclOO, or the now included incr Tcl.

Perhaps someone will eventually take a look at stooop and see if it
would benefit from being updated to make use of Tcl 8.6 features to
speed it up. I don't know of anyone considering that at this time,
however.

Nick Hounsome

unread,
Aug 6, 2009, 8:14:38 AM8/6/09
to
On 6 Aug, 02:32, BlueFox <bbeac...@desanasystems.com> wrote:

Use the best tool for the job.

If you get on with stooop and performance is not an issue then carry
on using it.

I think I read somewhere that the intention behind the new built in OO
implementation is not so much to replace all the other OO
implementations but to allow them all to be implemented as a thin
script layer on top of an efficient common C core thus reducing
migration and maintenance problems and, for those OO extensions
currently implemented only as scripts, to improve performance.

In particular, if you are looking to build mega widgets there is no
way that you want to be using the built in OO directly as all other
options save you a lot of effort.

IMHO snit is the easiest to use for many (but not all uses).

Gerald W. Lester

unread,
Aug 6, 2009, 12:51:50 PM8/6/09
to

As others have mentioned the core OOP is meant to be built on top of. [Incr
Tcl] is haveing a release that builds on top of it. I think SNIT is going
to be updated to take advantage of it. I'm not sure of STOOP.

You may want to ask the STOOP author (jfon...@free.fr) if he has any
intentions of updating it to take advantage of the core OOP.

--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+

BlueFox

unread,
Aug 6, 2009, 5:39:18 PM8/6/09
to
Thanks for all the info. I am not sure I can convince "management"
that we need to upgrade to 8.5 and add an OOP package into it. What I
was wondering, but didn't make myself clear, was if I created classes,
methods, etc. in STOOOP then would the future OOP syntax be the same,
or similar. The closer it is, the easier it would be to migrate in
the future.

I did not notice SNIT when I looked at Tcllib for OOP packages. Also,
I was under the impression [incr tcl] was not being maintained and had
not been touched in 10 years. It sounds as if it is being maintained,
and might be worth pursuing.

Gerald W. Lester

unread,
Aug 6, 2009, 6:09:28 PM8/6/09
to
BlueFox wrote:
> Thanks for all the info. I am not sure I can convince "management"
> that we need to upgrade to 8.5 and add an OOP package into it. What I
> was wondering, but didn't make myself clear, was if I created classes,
> methods, etc. in STOOOP then would the future OOP syntax be the same,
> or similar. The closer it is, the easier it would be to migrate in
> the future.

Check out the new core package on the web.

> I did not notice SNIT when I looked at Tcllib for OOP packages. Also,
> I was under the impression [incr tcl] was not being maintained and had
> not been touched in 10 years. It sounds as if it is being maintained,
> and might be worth pursuing.

Depends on what *kind* of OOP you want to do.

[incr tcl] is very C++ like.

Snit, to me, feels more Tclish -- a lot more flexable than [incr tcl].

Don't remember STOOP enough to talk about it.

You may want to look at http://wiki.tcl.tk/10771 and other pages on the wiki
or the net.

Nick Hounsome

unread,
Aug 7, 2009, 10:46:49 AM8/7/09
to
On 6 Aug, 22:39, BlueFox <bbeac...@desanasystems.com> wrote:
> Thanks for all the info.  I am not sure I can convince "management"
> that we need to upgrade to 8.5 and add an OOP package into it.  What I
> was wondering, but didn't make myself clear, was if I created classes,
> methods, etc. in STOOOP then would the future OOP syntax be the same,
> or similar.  The closer it is, the easier it would be to migrate in
> the future.

Why migrate?

Stooop will probably continue to work perfectly well pretty much
indefinitely if that is what you want to use. That is because it is (I
believe) pure Tcl.

It might be that future releases bend the syntax or semantics to
enable it to more easily fit on top of core OO. Your way to protect
yourself from this is to make sure that you "package require stooop
4". If anyone makes a breaking change for core oo then they should
change the major version. Multiple versions can coexist.

0 new messages