[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Adding, removing and redefining features at runtime

Chad Fowler

9/26/2003 1:31:00 AM

3 Answers

Samuel Tesla

9/26/2003 3:01:00 AM

0

Chad Fowler <chad@chadfowler.com> writes:

> If not for this feature, I might not have ended up staying with Ruby when
> I started learning it several years ago. It''s a unifying part of the
> whole dynamic feeling and philosophy of the language. Ruby without this
> feature would cease to be Ruby to me.

I agree completely on this topic. I just can''t express how big a
selling point this feature was to me. It has made writing unit tests
a *dream* I can override functions in modules like PAM so that they
can run in automated tests.

-- Samuel

Thomas Sondergaard

9/26/2003 7:58:00 AM

0


> # Is ruby merely being pragmatic by allowing you to do this, because it
seldom
> # causes any real problems? Or is it inherently wrong and should not be
> # permitted by the language/object model?
> #
>
> Why would it be in Ruby (and other languages) if it were inherently wrong?
> Sounds like kind of a loaded question.

Hey, be fair! While there are two sentences and two question marks it is
really only one question and the phrasing merely indicates two points of
views - pragmatic or simply wrong! Being a rubyist myself, I don''t think it
is inherently wrong, I think it is pragmatic!

Thomas


ptkwt

9/26/2003 6:16:00 PM

0

In article <87wubws1b2.fsf@alieniloquent.com>,
Samuel Tesla <samuel@alieniloquent.com> wrote:
>Chad Fowler <chad@chadfowler.com> writes:
>
>> If not for this feature, I might not have ended up staying with Ruby when
>> I started learning it several years ago. It''s a unifying part of the
>> whole dynamic feeling and philosophy of the language. Ruby without this
>> feature would cease to be Ruby to me.
>
>I agree completely on this topic. I just can''t express how big a
>selling point this feature was to me. It has made writing unit tests
>a *dream* I can override functions in modules like PAM so that they
>can run in automated tests.
>

This is an interesting idea, can you provide some more details?
Do you mean that you''re stubbing some methods which might not work in your
testing environment/context?

Phil