Python syntax in Lisp and Scheme

Alex Martelli aleaxit at yahoo.com
Sat Oct 11 13:08:39 EDT 2003


Doug Tolton wrote:
   ...
>> You are correct.  I misremembered "Tolton" as "Tilton" and confused
>> you with someone else.  *blush*
> 
> Heh, yeah I've noticed that a couple of times.  Poor Kenny keeps getting
> blamed for things I've said.  D'oh!

That's clearly you lispers' fault for not having "preferably only one 
obvious [i.e. widely different] way to spell your names".  (Admittedly,
in the Python world we run into similar issues with the name "Tim").


>> As for a language feature which should never be used.  Alex Martelli
>> gave an example of changing the default definition for == between
>> floats, which broke other packages, and my favorite is "OPTION
>> BASE 1" in BASIC or its equivalent in Perl and other langauges.

APL had that too (quad-IO, if I recall correctly) as well as the ability
to tweak comparison tolerance for numbers.  Eeek, to say the least.

>> That is, on a per-program (or even per-module) basis, redefine
>> the 0 point offset for an array.
> 
> Again, I can see setting corporate wide policies that specify if you
> change the OPTION BASE, we are going to take you out behind the shed and
> beat you silly.  I don't think the existence of OPTION BASE is a
> problem, personally I think it's when someone decides they want to
> change the OPTION BASE to 0 while everyone else is still using 1.  That
> doesn't necessarily imply that OPTION BASE is by itself and evil
> construct.

A third-party package is quite likely to assume SOME specific setting
of quad-IO, OPTION BASE, or other such global setting.  By providing
such global settings, therefore, the language is inherently restricting your
abilities to reuse third-party code seamlessly and in full respect of
the 'open-closed principle'.  Complicating a language to ensure that its use 
will split into mutually incompatible dialects seems truly evil to me.  In 
practice, any sufficiently complex language does in practice "get 
subsetted" by different groups using it, but at least, without global 
settings threading on each other's toes, you can still _re-use_ third party 
code (although perhaps not practically _maintain_ it, if it uses a subset
or style too different from what your own development group uses).


Alex





More information about the Python-list mailing list