[#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:03746] Re: Ruby coding standard?

From: Mathieu Bouchard <matju@...>
Date: 2000-07-02 18:33:50 UTC
List: ruby-talk #3746
> Because I tend to test my programs with the interactive interpreter, I use
> this feature to look for usage messages, usage warnings and the like.
> Most of the standard libray has docstring documentation. The WHAT part 
> I mentioned above is what may go into docstrings, along with some WHY.

Well, I'd like to keep the WHY part separate from the WHAT; this means
either separate sets of docstrings. Note that the WHY is probably not
occuring for every method, but rather applies to a group of methods, an
interface implementation, a whole class implementation, or even the
relationship between several classes. Writing "WHY" docstrings about
single methods is probably pointless.

> As for signatures, of course Ruby is not typed. But routines may require
> their arguments to respond to specific messages. it is IMHO useful to
> state some set of requirements on the arguments of a function.

In Java you can define interfaces (a set of methods signatures), specify
interfaces that a class implements, specify interfaces that parameters
must implement. Is that what you are thinking about?



Mathieu Bouchard



In This Thread