From: Michel Demazure on
Jörg W Mittag wrote:
> Jörg W Mittag wrote:
>> [...]
>> I believe that, like OO or logic programming, DCI is only going to
>> start to *really* shine (or, as the case may be, bomb spectacularly)
>> when we have DCI languages.
>
> BTW: I *do* realize that this contradicts what James and Trygve have
> been saying, that DCI is a paradigm that enables "good OO" in
> *existing mainstream* languages.
>
> jwm

I am not familiar enough with the DCI paradigm. But from times to times,
I feel that Ruby does not go far enough with duck typing. Modules are
not really objects ("everything is an object", they say), but a way to
assign methods to objects "from outside".

Yes, but you can quack like a duck ("include duck"), then miauw like a
cat ("include cat"), but you cannot come back to quacking. "Once a duck,
always a duck !", ODAD !

Is there a deep reason forbidding a more clever dispatching allowing to
de-include modules and/or re-include modules ?

md
--
Posted via http://www.ruby-forum.com/.

From: Michel Demazure on
Michel Demazure wrote:

>
> Is there a deep reason forbidding a more clever dispatching allowing to
> de-include modules and/or re-include modules ?
>

This would avoid the use of ad-hoc classes or singletons to disguise
modules.

md
--
Posted via http://www.ruby-forum.com/.

From: Ryan Davis on

On Feb 13, 2010, at 00:42 , Michel Demazure wrote:

> Modules are
> not really objects ("everything is an object", they say), but a way to
> assign methods to objects "from outside".

how are modules not objects? do they not have state? do they not have behavior? are they not instances of a class?

> Is there a deep reason forbidding a more clever dispatching allowing to
> de-include modules and/or re-include modules ?

the 'un' gem enables this.


From: Michel Demazure on
Ryan Davis wrote:
> On Feb 13, 2010, at 00:42 , Michel Demazure wrote:
>
>> Modules are
>> not really objects ("everything is an object", they say), but a way to
>> assign methods to objects "from outside".
>
> how are modules not objects? do they not have state? do they not have
> behavior? are they not instances of a class?

In that broad sense yes. But ...

>> Is there a deep reason forbidding a more clever dispatching allowing to
>> de-include modules and/or re-include modules ?
>
> the 'un' gem enables this.

Thanks, I'll try it.

md

--
Posted via http://www.ruby-forum.com/.

From: Michel Demazure on
Michel Demazure wrote:
> Ryan Davis wrote:

>> the 'un' gem enables this.
>
> Thanks, I'll try it.
>
> md

Where do I find it ? Thks.

--
Posted via http://www.ruby-forum.com/.