Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Wed, 25 Aug 2010 20:12:40 -0400

On Thu, Aug 26, 2010 at 12:19:33AM +0200, yy wrote:
>2010/8/25 pancake <pancake_AT_youterm.com>:
>>>> * I will probably swap the order of the conditional clauses: (what do you
>>>> think about it)
>>>>   3 3 == { 'Is equal duppy\n' print } if
>>>>  -->
>>>>  { 'Is equal duppy\n' print } 3 3 == if
>>>
>>> Hmm, personally I prefer the 'condition first' order... Why do you like
>>> the 'condition later' order?
>>>
>> My way is more logical fr a stack based vm. Just flip your mind. :)
>>>
>
>It does not work that way in postscript and, as I already said in
>another message, it does not work that way in forth, neither in toka
>or raven. Would you mind explainning why your way is more logical? I
>think it could get compicated once you introduce else or nested if
>blocks.

It does work that way in forth. At least, the conditional comes
just before the if token (though the branches come after it).

-- 
Kris Maglione
A smart terminal is not a smartass terminal, but rather a terminal you
can educate.
	-- Rob Pike
Received on Thu Aug 26 2010 - 02:12:40 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 26 2010 - 02:24:02 CEST