lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Jan 31, 2005 at 11:42:58AM +1100, skaller wrote:
> > I did 
> > something similar for the simple types (integer, reals, booleans; 
> > anything that doesn't carry an object reference) in the form of a 
> > large single level switch that decodes values combined from the 
> > operator and the operand types. Fast and simple, and yet makes it 
> > trivial to implement things like "Pascal style divison" (integer / 
> > integer ==> real, rather than integer).
> > 
> > The problems gather when you get to operations on objects...
> 
> Of course. It's impossible. This is the covariance
> problem I referred to in another post.
> 
> YOu need n^2 routines for n types, which doesn't fit
> into the n methods OO allows... this kills OO as a
> programming methodology with a one line argument.

It's certainly one of the numerous flaws in Java, but I don't think
you can dismiss OO in general so easily. Surely in a dynamically typed
language nothing more than multiple dispatch is required?

-- Jamie Webb