[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Ten Things Every Java Programmer Should Know About Ruby

e

1/29/2005 7:18:00 PM

> Lähettäjä: Navindra Umanee <navindra@cs.mcgill.ca>
> Aihe: Re: Ten Things Every Java Programmer Should Know About Ruby
>
> PA <petite.abeille@gmail.com> wrote:
> > > This looks more like Java than Ruby... I don't see your point.
> >
> > Sorry. Forgot to reboot in Ruby mode:
> >
> > aMethodExceptingToFlyABirdButGivenAPigInstead( aPig )
> >
> > And what would happen to this mythical flying pig now? aPig.fly()?
> > EXC_BAD_ACCESS (aka method_missing).
>
> Right. So aPig.fly() would work if method_missing() was defined or if
> a method Pig.fly() happened to be defined as an alias for
> Pig.eat_fly().
>
> In Java, on the other hand, you would clearly get the advantage that
> you seek here.

On the other hand, the time you save by writing Ruby code instead can
be used to write a unit test to ensure your logic is correct. There
are tradeoffs to everything.

> Cheers,
> Navin.

E