parse-time optimizations

David Bolen db3l at fitlinxx.com
Tue May 29 16:06:27 EDT 2001


jcm <grumble at usa.net> writes:

> Yes, although that brings us back to one of my original motivations
> for wanting to see this optimization--I think it's a better solution
> than having string-literal concatenation.  I guess I just don't like
> having too many wany of doing the same thing, especially in this case
> where it involves extra syntax in the language.

I'd probably take the opposite tack - to me seeing a "+" for
concatenation makes me think of executing code, which I would expect
to occur while the code is being interpreted.  Parser/compiler level
combinations make more sense to me to be distinct from that.  It would
seem to me to be more of a special case to handle + for two string
literal objects at the compilation phase rather than execution time
where + would be handled for all other object types.

But then again, I personally happen to like string-literal
concatenation, so that may color my viewpoint.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list