Re: [stack] sweetening concatenative syntax
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Mar 7, 2008, at 3:13 PM, 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. After the translation, each value is referenced only once. The function will need to be copied once (as it does when writing the pointfree version by hand), but no actual copying needs to occur if the function was not created via composing or partial application; it's just a pointer assignment. That's just an implementation detail though. Perhaps it'll be easier to show that it's linear once I can actually do the conversion... *ahem* - John