On 7/8/07, Stefan Rusterholz <apeiros / gmx.net> wrote:
> Seems I have to clear things a bit up, as I got the feeling I'm
> misunderstood.
Aren't we all ;)
Hmm I gotta go code hunt in the libraries.

I use Polymorphism extensively, and I use Duck Typing extensively in
the same Framework. I have Firewall Rules, they are highly polymorphic
-- and I was thinking to replace the polymorphism by delegation
already  because it might scale better, I use Duck Typing in a
completely different angle of the application; My DT objects are
servers.
Polymorphism could be used too -- I think I understand you better now
;) but that would not make lot's of sense as the protocol is tiny (#<<
actually).
The protocol I am using in my rules is huge (~30methods) so the
classical approach makes some sense (still I am a Zero on Delegation
and might miss some opportunities in that corner) as I inherit a lot
and relations like TCPForwarder includes Forwarder, includes TCPRule
etc. make some sense.

Maybe one is entitled to say Ruby offers more as the classical OO
approach, think twice before using it, I might agree.

But for the time being I still insist that Ruby support PM natively,
it would be unfair to deny it.

Cheers
Robert
> I don't say ruby doesn't have X or Y or so. I say asking "How do I do
> <Pattern A known from language X> in <language Y>" is the wrong
> approach.
> That way you end up asking (contrieved example ahead) how to do a for
> loop in ruby and in turn iterate over e.g. an array using some odd
> construct intended to simulate a for loop which doesn't exist 1:1 in
> ruby instead of just using the way nicer each.
> Instead IMHO you should ask "How do I solve problem X?"
> As in "how do I iterate over an array?"
>
> I'm hope I'm clearer this time.
> Regards
> Stefan
>
> --
> Posted via http://www.ruby-forum.com/.
>
>


-- 
I always knew that one day Smalltalk would replace Java.
I just didn't know it would be called Ruby
-- Kent Beck