Re: [stack] sweetening concatenative syntax
"William Tanksley, Jr" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
John Nowak <[email protected]> wrote: > William Tanksley, Jr wrote: > >>> Perhaps you find it easier, but there's objective reason why it > >>> shouldn't be easier. The point-free version is linear > >> They're both linear, at least where "linear" refers to how objects > >> are referenced. > > 'f' is referred to twice; that's nonlinear. > Keep in mind that the pointful version gets translated to pointfree > code. It's just syntactic sugar. We're comparing lambda notation to pure concatenative notation. Your claim is that lambda notation is "objectively" superior. It's a comparison of notations, not of underlying machine architectures. You can't have it both ways, using lambda notation to make something look good (subjectively) and then converting it to a concatenative notation to make it meet some objectively measurable property. It's objectively true that lambda notation freely allows nonlinear references. It's also true that this can be optimized away, but it's NOT clear how expensive that will be (the expense is always up-front with a concatenative notation, which is sometimes uncomfortable but always clear). > After the translation, each value is > referenced only once. And before the translation, the variable is used nonlinearly. > Perhaps it'll be easier to show that it's linear once I can actually > do the conversion... *ahem* In order to implement my version I directly translated your code... So I know it can be done. > - John -Wm