Christopher Diggins
http://www.cat-language.com
false true
?
James
--
James Tauber http://jtauber.com/
journeyman of some http://jtauber.com/blog/
- Christopher
Hi Manfred,Thanks for the example. First, even if the "\" were neccessary for the case of unterminated lists or quotations, the placement of it after map is artificial.>> [ [ f ] map ] map>> [ g ] filtershould have precisely the same meaning as:>> [ [ f ] map ] map [ g ] filterAt least this is how Cat works, and is my understanding of how the Joy interpreter should work as well.In theory the Cat interpreter can infer that the current expression is not complete, i.e. when a square bracket, paranthesis or curly brace remain unclosed. In which case the session might look like:>> [ [1 2 3]
\ [5 6 7]
\ [4 9 8] ]
>> [ [ f ] map ] map
>> [ g ] filterThe "\" character would be a prompt generated by the interpreter which means "finish your expression". As I mentioned earlier the other line breaks wouldn't change the meaning of the code.So there technically is no need for a line terminator character or continuation character in Cat. It just requires a bit of tricky code logic to achieve. Though I did implement in an earlier version of Cat, the current version doesn't support such smart line breaking in the interpreter. I will try to add it soon, and I appreciate you bringing the concern to my attention.Cheers,Christopher
On 11/2/06, Manfred Von Thun <m.vo...@latrobe.edu.au > wrote:__._,_.___
On 1/11/06 1:55 PM, "Christopher Diggins" <cdig...@gmail.com> wrote:
>
> On 10/31/06, Manfred Von Thun <m.vo...@latrobe.edu.au
> <mailto: m.vonthun%40latrobe.edu.au> > wrote:
>
> [..]
>> > Just one quibble, and I think it is an important one:
>> > You obviously want to avoid having a terminator (such
>> > as "." in Joy), and instead take end-of-line to mean
>> > "end of input, run interpreter".
>
> Except in the case of function definitions. In such case as "define x
> { ... }" the closing curly brace indicate the end of the input in the
> case of working with the interpreter. This is not working though in
> the current version.
>
> In the light of this, do you still feel that a termination character
> is neccessary?
>
> I can't imagine any scenario where this wouldn't be adequate, so any
> counter-examples would be helpful.
counterexample: suppose that I have defined all sorts of functions, and
I now want to use them to do something to a list of lists. Pretend that
Joy needs a continuation character ³\².
>> [ [1 2 3] \
>> [5 6 7] \
>> [4 9 8] ] \
>> [ [ f ] map ] map \
>> [ g ] filter
Would you prefer this over NOT needing ³\², instead having a single
³.² after ³filter²?
Best wishes
- Manfred
[Non-text portions of this message have been removed]![]()
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | UnsubscribeSPONSORED LINKS.![]()
__,_._,___