Python's DSLs (was: A critic of Guido's blog on Python's lambda)

aaronwmail-usenet at aaronwmail-usenet at
Wed May 10 14:16:33 EDT 2006

Cameron Laird wrote:
> In article <1hewvsx.11x9f301gbjrhqN%aleaxit at>,
> Alex Martelli <aleaxit at> wrote:
...			.
> >Of course, the choice of Python does mean that, when we really truly
> >need a "domain specific little language", we have to implement it as a
> >language in its own right, rather than piggybacking it on top of a
> >general-purpose language as Lisp would no doubt afford; see
> ><> for such a DSLL developed
> >at Google. However, I think this tradeoff is worthwhile, and, in
> >particular, does not impede scaling....
> ....I'm confused, Alex:  I sure
> think *I* have been writing DSLs as specializations of Python,
> and NOT as "a language in its own right"....

I think Alex is suggesting that if they used, for example, a version of
with a good optimizing compiler they could implement sawzall like
with almost the same performance, including startup, etc. whereas even
highly optimized python based approach would at least have a
large startup penalty.  For an environment like Google where they
thru their logs of various sorts doing lots of trivial scans you can
probably save
a lot of money and time on lots of machines by optimizing such scrapes
(but keep your bactine handy).  And as the sawzall paper pointed out,
even static
type checks can prevent a lot of wasted machine bandwidth by avoiding

But the real question for someone like Rob Pike is why use scheme when
can invent another little language instead, I suspect :).

  -- Aaron Watters


Stop procrastinating soon.

More information about the Python-list mailing list