lua-users home
lua-l archive

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


On Sat, 2005-01-29 at 14:29, Thiago Bastos wrote:
> > > Please, read this guy's homepage first before spreading his stuff to
> > > other
> > > lists.
> >
> > Sorry about that.
> 
> Actually, thanks for pointing this "gem" out!

Lol .. I have no idea if his history is correct,
but his political viewpoint is spot on :)

Unfortunately, from my point of view the analysis
missed the most important point. Well to me anyhow.

OO was touted as a way to find the Holy Grail of
programming -- reuse. Reuse depends on polymorphism,
and polymorphism on abstraction.

The central idea of OO is encapulation, providing
a way to allow functions to abstract the details
of data representation away.

This idea, IMHO, is just fine. If only it worked.

The problem is it does not work. This isn't a waffle
statement about engineering but irrefutable
mathematical fact (search for 'covariance problem')

Roughly speaking you can't do any relations in OO,
and that's 90% of all business problems which it can't
handle. This includes any binary operator such as addition,
So its 99.999999% of all mathematical problems it can't handle :)

Classes work fine only if all the required
method arguments are invariant (eg device driver
writing char vs addition of Number to Number).

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net