Namespace, Psets, Order, IDs, Joy (was: Intent)

btanksley@hifn.com btanksley@hifn.com
Tue, 11 Apr 2000 10:07:14 -0700


From: iepos@tunes.org [mailto:iepos@tunes.org]

>Anyhow, a similar technique could be used in a Joy-like system,
>so that if the system had a function named "divide" and the programmer
>wanted to call it "quotient", it could be renamed with something
>like this:

>  [divide] "quotient" rename

There's no reason to do this -- instead, use definition:

 quotient == divide.

>In a similar way, the programmer could also change the order of a
>function's parameters to the order he preferred. For instance, suppose
>"divide" had taken the parameters in a order that seemed backwards
>to the programmer; then he could have fixed it with:

>  [swap divide] "quotient" rename

>Or if he had still liked the name "divide" but just wanted the change
>the order:

>  [swap divide] "divide" rename

  divide == swap divide.

>Anyway, this example just refers to a mythical Joy-like system;
>this type of thing is not possible in the existing Joy.

Eh?  Why not?  Function naming and definition is part of the system.

>I guess I'd agree with that. I like the idea of a system not keeping
>source code around, but instead just keeping an internal version 
>(possibly using something like your ID's instead of English-text
>function names) that can be more easily manipulated; then, if a coder
>wants to see a program, the system would generate the text on-the-fly
>to match the coder's preferences, such as the names and order of
>functions and pretty-printing styles, and the column width of his
>terminal.

Chuck Moore tried that with his OK system (he also called it 3/4th), and
decided that it had been a mistake.  Perhaps he oversimplified; you can read
about it in general on http://www.ultratechnology.com.

I _do_ agree, though, that the programming tools (especially the
configuration management) ought to have _complete_ control over code
formatting.  It's ridiculous to have a mere formatting change mess up diffs.
Not even renamings should mess up diffs -- the configuration manager should
understand the source.

>Of course, there might be some cases where the coder really does
>want control over the exact layout of the code; for instance, this
>may be the case if one is writing a program for some Obfuscated
>Coding contest. In this case, some mechanism should still be provided
>so that the textual source code can still be worked with.

It's called a "text editor".  Don't use the language's tools to do that; I
don't want to make the tools too smart.

>- "iepos" (Brent Kerby)

-Billy