Sam Tregar wrote:
> 
> On Thu, 31 Aug 2000, David L. Nicol wrote:
> 
> > We're talking about making a faster Perl.  C's syntax requires enough
> > clarity to compile to something quick.  it is a very short hop from
> >       my dog $spot;
> > to
> >       dog spot;
> 
> What about the second version would result in faster execution?  Do you
> think that the "$" slows down Perl?  Is it that dropping the "my" would
> make "spot" global and thus faster?  What are you getting at?

No, I imagine that dropping both the my and the $ would make spot a
fixed-size stacked lexical, as it does in C.  A speed increase would
result from the code clarifier being able to resolve references to spot within
the current and enclosed blocks as a fixed offset from a known pointer rather
than five or six of those.


> Again: C doesn't get its speed from its syntax.  Supporting C-esque syntax
> doesn't make Perl faster.

 C syntax and Perl syntax are mostly compatible in what is not
a syntax error in the other.

A lot of code is in C.

Including it -- like,

        #include "somecode.c"

has immense potential for re-use value.

Supporting C semantics -- fixed offsets from a stack pointer instead of
table lookups -- may very well make perl faster.



-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
          Kansas City Perl Mongers will meet Sept. 20th at 7:00 in
          Westport Flea Market Bar & Grill  http://tipjar.com/kcpm

Reply via email to