[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: [suby-ruby] Your all time desired fundemental Ruby mod

Peña, Botp

1/17/2005 9:29:00 AM

trans. (T. Onoma) [mailto:transami@runbox.com] wrote:
//I'm taking a little poll.
//
//Let say you're Matz, but without any of the pressures of
//keeping up with a
//previous version of Ruby. What one thing above all others
//would you like to
//see differ about Ruby?

has Eiffel's pre/post condition
(I do not know how eiffel does the magic)

something like (sample only):

def to_counting thing
pre do
thing.respond? :to_i
thing.to_i > 0
end
post do
! self.nil?
self.respond? :+
self.value > 0
end
#...
end

many a time, the conditions make up the most bulk of the program. Having
pre/post conditions can make them of use since they will self document a
program and provide test.

thanks for asking.
//
//T.
//

kind regards -botp