What If Python Replaced Elisp?

Samuel A. Falvo II kc5tja at garnet.armored.net
Thu Mar 9 16:08:09 CET 2000


In article <MFVx4.169$Mn5.178282496 at newsa.telia.net>, Fredrik Lundh wrote:
>umm.  does using an explicit syntax tree turn Lisp
>into a statically typed language?

No, but I don't see what this has to do with the point I was trying to make
either.

>Python's interpreter spends very little time decoding
>the byte codes.  it spends lots of time looking things
>up in dictionaries, filling in call frames, creating bound
>method objects, and preparing argument tuples, just
>to name a few things...

All of which can be eliminated with various optimization options.  I have
yet to use Python to anything even remotely close to its fullest
capabilities, and I've been working with the language since 1.3.  In fact,
I use most of Python's "unique features" for temporarily patching bugs in
code I'm interactively debugging.  Finished code, however, rarely uses
anything more esoteric than nested function definitions.

I would love to be able to put something like this at the top of my Python
code:

	#!/usr/bin/python -O2
	
	... normal Python code here ...

Or, for that matter, to make such things integral to the language itself, we
could provide a pragma directive:

	#
	# Set various language options for remainder of code...
	#
	
	pragma {"TailRecursion": 1, "TypeInferencing": 1, ...etc... }
	
-- 
KC5TJA/6, DM13, QRP-L #1447
Samuel A. Falvo II
Oceanside, CA



More information about the Python-list mailing list