[#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:03983] Re: Principle of least effort -- another Ruby virtue.

From: Conrad Schneiker <schneik@...>
Date: 2000-07-13 22:54:55 UTC
List: ruby-talk #3983
Hi,

Dave Thomas wrote:

> Conrad Schneiker <schneik@austin.ibm.com> writes:
>
> > I think Von Neumann once
> > mentioned that every law of physics could be equivalently expressed in
> > terms of the principle of least action.)
>
> Is that the same as Hamiltonians?

I think it might be somewhat better to say that the Hamiltonian formulation
is a useful tool for dealing with problems in the least action framework.
Likewise for Feynman path integrals.

> > Well, I think Ruby offers far greater scope for the application of the
> > principle of least effort than most other languages, and this principle
> > seems to have been implicit in the design of Ruby. So I think we can
> > usefully summarize many comments about the virtues of Ruby syntax,
> > elegance, uniformity, OOP features, and so on as "Ruby embodies the
> > principle of least effort".  It is Ruby's realization of the principle
> > of least effort which helps makes solving hard problems easier.
>
> I couldn't agree more. Andy and I call this virtue 'transparency'. By
> that we mean that Ruby doesn't obscure the problem solution by
> imposing itself, either in terms of extraneous syntax or by making the
> programming write all sorts of scaffolding code to support the
> application logic. Ruby gets out of your way.

That seems a rather round about way of making the good point that other
languages are still comparatively primitive. I would just say that Ruby
provides a very powerful and very easy to deploy "shoulders of giants" OOP
scaffolding framework so that you can much more quickly and easily build what
you want to build to do what you want to do. (Hmm, I think some variation of
that is going to end up in the newsgroup FAQ.)

> However, maybe we can look at a list of Ruby's principles of least:
>
> Principle of Least Surprise
> Principle of Least Effort

Well, I think the canonical least list of least principles for Ruby (subject
to previously mentioned qualifications) is probably:

    Principle of Least Effort.

If so, the general reason would be that this principle more strongly entails
more of the other applicable least principles than is the case for any of the
other such least principles. That list is also the self-applicable least
effort list. The Principle of Least Effort is intuitively self-descriptive,
and may take the least effort to explain, making it a natural slogan for
Ruby. (That's what I think at least. :-)

--
Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)



In This Thread