Afficher un message
Vieux 27/02/2008, 17h35   #84
Pit Capitain
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Monkeypatching is Destroying Ruby

2008/2/26, Clifford Heath <no@spam.please.net>:
> Well, I can't find import-module-extended, but assuming it's like
> import-module... you're missing:


Clifford, thanks for listing your requirements.

> * performance


Comparable to other AOP frameworks in Ruby. That might be an obstacle
for you, but it's not for me yet.

> * isolation of instance variables that the extensions might create


If you are really serious about this, there are ways to achieve this goal.

> * ability for an extended class to *always* appear extended when
> called from anywhere in a class that knows about those extensions,
> without having to constantly remember to add the extensions on each
> call.


Please look at my sample code again. It does exactly what you describe.

> Is that enough to claim "no sensible way" of doing it?


Not for me, as I said above. But since there's no formal definition of
"sensible ways", there might be no sensible way for you. Maybe we
should take this to another thread or to private mail if you want to
discuss it further.

Regards,
Pit

  Réponse avec citation
 
Page generated in 0,04559 seconds with 9 queries