On Wed, Mar 30, 2011 at 7:02 PM, Jonathan S. Shapiro <[email protected]> wrote:
> is single inheritance and overloading sufficient?

I really hate to make this comparison,

but if you consider objective-c which uses the smalltalk object model,
it only has single inheritance, no overloading, and no templates/generics

It gets away with this through 2 concepts,
dynamic dispatch, and an utter lack of type safety, 'everything is an object'.

with type variables in place, changing 'everything is an object' to
'everything is of some type'.  you must add overloading which gives us
dispatch though not dynamic.

squint your eyes, and you have a rough equivalence to something which
has proven to be sufficient (within the universe where it has been
accepted.), the major difference is the lack of dynamic dispatch,
which is not something type classes is just going to give you.

I personally find it sufficient.

(I don't know smalltalk but do know objective-c so didn't want to make
the comparison directly)

note: objective-c has something roughly equivalent type classes which
they call 'protocols', these were added to give some mediocre amount
of type safety to an otherwise unsafe language (to ensure that an
object implements the methods required).
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to