[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Org, Hyperbole, and eev

From: Eduardo Ochs
Subject: Re: Org, Hyperbole, and eev
Date: Tue, 28 Jun 2022 01:48:15 -0300

On Sun, 26 Jun 2022 at 21:50, Robert Weiner <rsw@gnu.org> wrote:
> So here is a simple implementation that is not unlike your own
> though the functions are a bit simpler and more clearly documented
> _without a listing of every possible test case type_ and requires
> neither Hyperbole nor Org until you want to activate things as
> buttons:

Hi Robert,

I think that the part in "_..._"s above deserves a detailed answer.

I started using GNU/Linux in the mid-90s. Before that my favorite
languages were Icon and Forth. In Forth I could do AMAZING things in
less than 50 lines of code, but my programs would usually become
confusing and unmanageable when they grew bigger than that.

There is a famous book by Fred Brooks called "The Mythical Man-Month",
and one of its chapters is called "Plan to Throw One Away":


I took that slogan seriously. Most of the time when I realized that
something that I was doing by hand could be automated I would write a
first attempt to automate it - _as a prototype_, that I regarded
partly a program and partly as a way to help me think how that task
could be structured, and that would probably be "thrown away" if I
needed a cleaner solution later.

In Forth it was very easy to implement both strange interfaces and
little languages, in this sense:


In Emacs less so, but I could still do lots of funny things using
eval-last-sexp to use sexps as buttons.

When we are writing throwaway code "planning to throw one away" then
using tests in comments is a very good way to document the code. And
when I rewrite my prototypes I usually prefer to document them using
text ***AND*** executable examples rather than just text. One of the
effects of using this style is that the users of eev see that they can
use that style in their notes too - and with that their notes become
much closer to being "executable notes", in this sense,


than they would be if they believed that they had to write the docs of
their functions as just text.

You are sort of saying that having tests in comments is bad style.
Well, it's not. =/

    Eduardo Ochs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]