Java's modules rock? (was Re: election details)

Andreas Raab andreas.raab at gmx.de
Fri Mar 2 06:53:38 UTC 2007


Michael van der Gulik wrote:
>> But this is easy given that Java freezes everything at compile time.
>> No extensions to anything allowed post-compile (ok - post load).
>> Unfortunately, the bar is higher in Smalltalk as we want to allow
>> extension of anything.
> 
> I assume you mean being able to add methods to any class in the image
> rather than just the classes in your own package?

That has been the implicit assumption, yes, but personally I don't see 
that as a requirement. If the tradeoffs are between changing methods on 
class Object and having a workable and reasonably secure module system I 
would opt for the latter.

> Now... if I make a stable, usable, clean and largely
> backwards-compatible solution, will people integrate it into Squeak?

I can't speak for Squeak, but for Croquet I would say, yes, we would. 
And I would also say that the focus should be on "stable, usable, clean" 
and much less on "largely backwards-compatible" ;-)

> It would be a very large, dare I say revolutionary change.

So is Croquet. You'd feel right at home.

> The most common reason people do this is to check if an instance is of
> a certain class (like Object>>isMorph or Object>>isMyStupidClass) -
> people should use isKindOf:. If that is too slow then isKindOf: should
> be made a primitive method.

Right. And that's just what I (not quite coincidentally ;-) said in a 
recent discussion with Goran - having a very, very fast type test of 
some sort would solve quite a number of problems .

Cheers,
   - Andreas



More information about the Squeak-dev mailing list