On Fri, Apr 1, 2011 at 4:06 PM, Jonathan S. Shapiro <[email protected]> wrote:

<snip>

> The question of when to use inheritance and when to use type classes seems
> challenging to answer. I wanted to avoid having confusingly similar ideas in
> the initial language. If nothing else, I wanted to avoid this for me. As a
> personal matter, OO idioms are very familiar, and I found myself reaching
> for them at the wrong times. Taken in combination with [1], this is a hazard
> to pure programming.

<snip>

> Reactions and thoughts?

I guess its worth comparing to other impurely-object-oriented
languages and where 'zoning laws'
affect the choice of whether to choose o-o or unadulterated(?) style.

In C++ (i'm not much of a c++ programmer so please do correct me if i'm wrong)
if you want to do generic programming, you're limited to templates on
functions/classes
that is to say, absent any state there are still reasons for why you
might choose to use classes.

In Objective-c because generic's are only provided at the type level
(every object is a generic object),
you are limited to objects for things like collections, which means to
put a non-object into a collection etc
you must wrap that non-object into an object.

I think both cases show a separation between the styles, and that with
bitc providing type variables to the
unadulterated form of the language, the choice of whether to use
unadulterated or o-o styles may/might/hopefully
be limited to whether 'state + interface' is appropriate to the
problem being solved.  At least I think bitc is in a much better
position to meld the o-o paradigm, than a language such as c.

That said, I think its something worth tinkering with once we have a
compiler with all of the must-have's.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to