On Mon, Apr 7, 2008 at 3:23 AM, janko metelko <[EMAIL PROTECTED]> wrote:
> I was proposing this on irc too... multiple retain stacks that you can
> create and name on your own. And then also important is that stacks would
> have not just push, pop functionality but also peek (so that value stays on
> stack)
>
> but I don't like your syntax that much, why would you have to define them
> and use some structure (block) where there I don't see the need for it.
>
> >people (could silently create and PUSH on them if they aren't yet created,
> or a special syntax could be made for this to be)
>
> people> (POP)
>
> people|> or people (or something else for PEEK)
>
> best regards,
> janko

In the XML parser I wrote, I use an explicit stack, but it doesn't
require any special language features. In a dynamically scoped
variable, I hold a vector that can be pushed to, and I have words
defined (push-xml and pop-xml) that manipulate this stack. The whole
thing is either three or six lines of code, depending how you count.
It could be abstracted into some kind of declaration STACK:, but
doesn't require any special language features.

Dan

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to