Python syntax in Lisp and Scheme

Pascal Costanza costanza at web.de
Sat Oct 11 13:57:08 EDT 2003


Alex Martelli wrote:
> Jon S. Anthony wrote:
>    ...
> 
>>bombs waiting to go off since they have long standing prior meanins
>>not in any way associated with this type of operation.  OTOH, if you
>>really wanted them, you could define them.
> 
> 
> Is it a good thing that you can define "bombs waiting to go off"?

Yes.

>>>Python's reply "There should be one-- and preferably only one --
>>>obvious way to do it."
>>
>>This then is probably the best reason to _not_ use Python for anything
>>other than the trivial.  It has long been known in problem solving
>>(not just computation) that multiple ways of attacking a problem, and
>>shifting among those ways, tends to yield the the better solutions.
> 
> 
> One, and preferably only one, of those ways should be the obvious one,
> i.e., the best solution.  There will always be others -- hopefully they'll 
> be clearly enough inferior to the best one, that you won't have to waste
> too much time considering and rejecting them.  But the obvious one
> "may not be obvious at first unless you're Dutch".

Python probably really offers a good selection of features suited for 
particular problems. But it is very unlikely that it provides the right 
set of features for all conceivable problems. To put it in a provocative 
way, Python is a domain-specific language for vaguely defined domains - 
those that GvR (subconsciously?) had in mind when he designed the language.

I am pretty sure that Python is an excellent language for a lot of tasks 
- otherwise it wouldn't be used by that many people even though it 
didn't have a massive budget as Microsoft and Sun can provide for their 
pet languages.

But on the other hand, it is also clear that for unknown domains yet to 
be explored you cannot know the best set of features in advance _by 
definition_.

Here is a conjecture - I am not sure myself whether it is true, but 
anyway: The choice for a particular language is _always_ driven by a 
wish for safety. What the various languages provide are different 
perspectives on safety.

Pythonistas are probably driven by the assumption that the language 
designers have found the best language feature for any task that might 
arise. And even if they are not optimal in some cases, they at least 
help to better understand the code of each other. This makes them feel 
safe. (And these assumptions might even be true for 90% of the tasks 
that arise in the domains in which Python is actually used.)

Lispniks are driven by the assumption that there is always the 
unexpected. No matter what happens, it's a safe bet that you can make 
Lisp behave the way you want it to behave, even in the unlikely event 
that something happens that no language designer has ever thought of 
before. And even if you cannot find a perfect solution in some cases, 
you will at least be able to find a good approximation for hard 
problems. This makes them feel safe. (And the large libraries provided 
with Common Lisp and some Scheme systems still cover 90% of the standard 
tasks.)

> The worst case for productivity is probably when two _perfectly
> equivalent_ ways exist.  Buridan's ass notoriously starved to death in
> just such a worst-case situation; groups of programmers may not go
> quite as far, but are sure to waste lots of time & energy deciding.

No, the worst case for productivity is when no way exists.

Yes, it is good thing that a language enables you to "define bombs 
waiting to go off", because this means that you can also define 
solutions for your unexpected problems.


Pascal





More information about the Python-list mailing list