[Xotcl] Re: XOTcl is great!!
setok at fishpool.com
Thu Sep 8 12:33:56 CEST 2005
On Thu, 8 Sep 2005, Gustaf Neumann wrote:
> i have started some work towards turning packages into objects, where a
> is an instance of a class Package. This allows in general to
OK, this sounds interesting. I think the most important for something like
this is that it should be clearly stated why it is better than the normal
Tcl mechanism, seeing as it would kind of compete with it (and more
mechanisms isn't always best if one wants to keep the code clean).
>> The problem with this is that classes are not automatically searched for
>> in the same package. That is if Class A depends on Class B (A is B's
>> sub-class), B needs to be read in before A is read. In Java it is enough
>> that they are in the same package, they'll be found. With XOTcl you need
>> to build a kind of stub file that represents the package and which then
>> sources in all the other necessary files in the required order.
> a few remarks to this:
> - what's wrong with "package req package-providing-class-B" in the package
> containing class A?
That is two fine. I would prefer to have lots of related classes being
part of the same Tcl package. For that, I have to build a stub package
which then includes the rest in the appropriate order (or using some kind
So it doesn't really reflect the Java model, which is fairly
And just for the record: I'm not a big Java advocate. In fact I think they
have made serious design mistakes in many areas. Even in packages they
forgot a very important part of the picture: version numbering.
More information about the Xotcl