[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03900] Re: require, ensure, and Design by Contract

From: Andrew Hunt <andy@...>
Date: 2000-07-09 14:27:24 UTC
List: ruby-talk #3900
	>Hi Ruby people,
	>
	>currently, I am reviewing the forthcoming Ruby book of Dave and Andy.
	>Some time ago, Andy told me, he planned to add direct support for Design
	>by Contract to Ruby. As a convonced Eiffelist, furthermore working for
	>the company, where Eiffel has its origin :-), I would like a Design by
	>Contract support in Eiffel very much.
	>
	>Sadly, I discovered though that two of the "classic" DbC keywords,
	>"require" and "ensure", already have another meaning in Ruby. Are there
	>currently any plans to add Design by Contract support to Ruby? If yes, I
	>would likke to give some input.


I've been threatening to implement such a beast for some
time; as soon as I have a free minute I'm still hoping to
get to it.  I agree that it could be an important feature
and good selling point for Ruby.

Yes, the Eiffel style keywords have already been used.
In the few trial versions I've put together, I used
"pre" and "post" as the keywords, in addition to
an "invariant" method and a simple "check".

I believe that DbC can be added purely as an add-on in Ruby,
that no interpreter changes will be necessary -- Matz
is busy enough as it is, I'd rather not burden him with
anything extra if I can help it :-)

Perhaps I can carve out some time this week to give it
another look...

/\ndy


--
Andrew Hunt, The Pragmatic Programmers, LLC.
Innovative Object-Oriented Software Development
web:   http://www.pragmaticprogrammer.com   email: andy@pragmaticprogrammer.com
--
Our New Book: "The Pragmatic Programmer" Published by Addison-Wesley Oct 1999
              (see www.pragmaticprogrammer.com/ppbook)
--

In This Thread

Prev Next