Re: [stack] Why is point-free form so interesting?

"Christopher Diggins" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On 7/9/07, John Carter <[email protected]> wrote:
> On Sat, 16 Jun 2007, Christopher Diggins wrote:
>
> > I have been struggling to formalize/rationalize my intuition that
> > point-free form is somehow better than a form with names from the
> > standpoint of tools (e.g. analyzers, compilers, translators,
> > optimizers, etc.).
>
> Probably because the pros and cons are symmetrical...
>
> ie.
>
> The Good thing about point free form is the mechanism for getting from
> parameters to using them in expressions is explicit.
>
> ie. You know exactly how the magic happens.
>
> The Bad thing about point free form is the mechanism for getting from
> parameters to using them in expressions is explicit.
>
> ie. You know exactly how the magic happens....but you're almost sure
> you don't care as any other mechanism should still give the same
> answer and it's presence is just noise not signal.
>
> As usual Christopher is asking a valuable question...

Thank you.

> ...perhaps we can rephrase it...
>
> Is there a representation of a program where the mechanism of moving
> parameters to values in expressions is...
> * Explicit (ie. Can be reasoned about / transparent on inlining)
> * Trivial (Adds almost nothing to the code / vanishes in this representation)?

I like this a lot. This does a good job of summing up what I like
about point-free form very elegantly. One point though, is "explicit"
the correct term? I would normally consider argument passing in a
stack-language to be implicit, rather than explicit. However I agree
that it is obvious and unambiguous.

Some other bullet points concerning what I like about point-free form
(I've just brainstormed these and expect that they can be refined):
- data transfer is obvious
- data transfer is automatic
- function forms are uniform (stack -> stack)
- order of evaluation is simple and unambiguous: left to right (no
precedence rules)
- subterms can be evaluated concurrently

Cheers,
Christopher
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.