develooper Front page | perl.perl6.internals | Postings from March 2006

User stack: Worthwhile?

Thread Previous | Thread Next
From:
Bob Rogers
Date:
March 1, 2006 04:40
Subject:
User stack: Worthwhile?
Message ID:
17413.38472.274450.401594@rgrjr.dyndns.org
   From: Chip Salzenberg <chip@pobox.com>
   Date: Mon, 27 Feb 2006 09:46:42 -0800

   On Fri, Feb 24, 2006 at 12:57:24AM +0100, Leopold Toetsch wrote:

   > That's indeed an (indirect) answer to the 'do we really need it' part ;)

   Is there any other client of the user stack that can't be easily replaced by
   some kind of *Array?  It'd be nice to lop off such a low-value feature.
   -- 
   Chip Salzenberg <chip@pobox.com>

I can think of two more strikes against it:

   1.  In error handling code, it's a pain to restore the stack state.
You have to (a) take note of the depth before starting, and (b) emit EH
code to pop back to that level.  This is made more difficult by the fact
that . . .

   2.  Stack entries are "strongly typed," i.e. you have to know the
INSP type of the thing you pushed in order to pop it, or you get an
error.  This is in stark contrast to the new calling protocol, which is
willing to convert.

   Neither of these are fatal, but both make the user stack harder to
use than it could be.  IMHO, it seems easier to flush it than to fix it.

					-- Bob

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About