Re: [stack] What does "concatenative" actually mean?
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Mar 3, 2009, at 4:54 PM, Robbert Dalen wrote: >> I don't believe you! Can you demonstrate how a "hello world" program >> would work? > > "hello world" Maybe a bad example. Can you demonstrate how to read a line from a file and echo it to the user? >> This property holds for Joy in all cases; the impure IO doesn't make >> any difference. What you can't do is replace an expression with the >> result of evaluating it, e.g., you can't replace '1 2 print' with >> '1'. >> This is another reason why I think it is not useful to say Joy is >> referentially transparent. > > but what if you construct a quotation from a file and then execute it? > this piece of concatenative code cannot be replaced by a word, because > the file can be different at every invocation. I'm saying that you can factor out any subexpression. Any subexpression is a function. It makes sense to say that you can name this function and use the definition of the function instead of its name. (Or, at least you could if quotations were closed.) Constructing a quotation from a file is another story. You're talking about referential transparency; replacing an expression with its *value*. I'm talking about replacing an expression with a name for that expression. - John