merits of Lisp vs Python

Stefan Nobis snobis at gmx.de
Sun Dec 10 08:33:27 EST 2006


Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> writes:

> Is that an argument against factory functions? Damn straight it is:
> they are a powerful tool, and in the hands of morons, they can be
> dangerous. Does that mean that languages shouldn't permit
> higher-order functions? Not necessarily: all programming tools can
> be misused, but some can be misused more easily than others. Power
> and risk is often a trade-off, and language designers can't
> eliminate all risk of stupid behaviour, but they can design the
> language to allow whatever level of risk they believe is
> acceptable. (E.g. there is no doubt that C's raw pointers are
> powerful, but many languages deliberately don't use them.)

I understand your point, I understand the Java folks. But I think this
point of view is really wrong. The right solution would be to better
train people, to give more good examples or even to not employ those,
who don't grasp it.

You point of view is that of (big) companies: Every developer should
be equal, exchangable. I'm very sure this is only an illusion. And I
think this point of view leads to many failures of (big)
projects. Each project has it's working horse(s) and these are quite
more equal than the others. :)

To deny the good developers, the working horses the power they need
isn't a good idea. Give them all the tools they need and let others
learn from them -- so (nearly) everybody becomes a good to great
developer.

Am I naive? Maybe...

> The risk of stupid factory functions is small compared to the
> benefit, but maybe there is some domain somewhere where the ideal
> solution is a language that DOESN'T treat functions as first class
> objects, deliberately weakening the language so that a particular
> class of errors (or stupid behaviour) just cannot happen.

And with Lisp macros the good developers may easily create these DSLs
to be used by the not so good developers. :)

> That's the perspective of many people, and maybe it is wrong. Maybe
> you really need to be immersed in Lisp for a while to see the
> advantages of macros.

Yes, I think this perspective is wrong. Some time ago I wondered about
the hype of LinQ -- with Lisp macros it's already there. These things,
embedded languages (like embedded SQL, embedded Prolog, ...) are
really great. I also hate the amount of boilerplate code nesseccary in
Java -- yes, in Python it's muss less, but in Lisp it really vanished.

If you use a really good designed language which don't assume every
programmer to be dumb and equal, yes, maybe macros would be not that
big a bonus. But hey, they are not worse than operator overloading and
the like, so why not include them? (Answer: In most cases it's hard to
add macros because of non-homogenous syntax.) :)

-- 
Stefan.



More information about the Python-list mailing list