Re: [stack] Re: Concatenative Research

John Nowak <[email protected]> Sun, 6 Feb 2011 23:08:29 -0500
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Feb 3, 2011, at 1:41 PM, John Cowan wrote:

> Justin scripsit:
> 
>> Agreed! Quotations should be opaque, functions should be unable to
>> gauge the depth of the stack, and functions should be unable to discern
>> anything about the parts of the program following them.
> 
> *sigh*
> 
> The minute anyone gets a hold of the Joy model, the first thing they ditch
> is the beautiful code/data duality. It is IMHO part of the essence of Joy
> that you construct lists-as-code with the same mechanisms you use to
> construct lists of any sort, and the stack is just another list.

I don't think that's part of the essence of Joy. It has nothing to do with Manfred's goals... so far as I know. More on that later.

In either case, why not simply offer an 'eval' function that converts a list to an opaque quotation? You can then choose whatever is appropriate based on the problem instead of being locked in to a language without the ability to form abstractions.

> Sacrificing that beauty to the fashionable model of static typing strikes me as just sad.

Referring to static typing as fashionable is silly. It's just the opposite nowadays if anything.

Either way, it's not being "sacrificed" just for typing. The problem with non-opaque quotations is that they destroy equational reasoning. In a Joy program, can you replace 'swap drop' with 'nip'? The answer is, "it depends". It depends on if it's in a quotation or not, and if it is, if the quotation may, at some point, be manipulated as a list.

The essence of Joy, in my opinion, is simple equational reasoning. Manfred talks a lot about Joy's "exceptionally simple algebra". That seems to be the whole point of it. The problem, however, is that the algebra just doesn't work because you can't safely manipulate programs. A language where there is not a single program manipulation you can always safely perform doesn't strike me as having a particularly simple algebra. Moreover, the side conditions you need to prove to be able to manipulate something are, in general, whole program semantic properties. At least with the lambda calculus, things like required alpha conversions are simple, local, syntactic issues.

- jn