Re: [stack] Why is point-free form so interesting?
John Carter <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 13 Jul 2007, Christopher Diggins wrote: > On 7/10/07, William Tanksley, Jr <[email protected]> wrote: >> John Carter <[email protected]> wrote: >>> Christopher Diggins wrote: >>> 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)? >> >snip< >> Stack notation is NOT the simplest possible data transfer notation; it >> imposes a total ordering on data, when often a partial ordering is >> sufficient. > > This is an interesting point. Specifying an ordering where non is > intended. >snip< > Many programming languages don't even bother allowing people to > specify unordered data because it would introduce new constructs, > operations, or representations into their language, thus increasing > complexity. Aha! Here we have the meat of it. Yes, having an unorder data type is implementationwise more complex, but semantically simpler. I suspect "unordered set" needs to be a (or the) primitive. Arrays and lists are a premature optimization that make reasoning about the langauge harder as they add spurious information that has to be dealt with. Parameters probably should be a set, and a binding should be a map (an unordered set of pairs). John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : [email protected] New Zealand