Lisp development with macros faster than Python development?..

Discussion in 'Python' started by seberino, Jul 5, 2005.

  1. seberino

    seberino Guest

    I've been reading the beloved Paul Graham's "Hackers and Painters".
    He claims he developed a web app at light speed using Lisp and lots
    of macros.

    It got me curious if Lisp
    is inherently faster to develop complex apps in. It would seem if you
    could create your own language in Lisp using macros that that would be
    quite an advantage....

    I realize that Python has operator overloading and OOP so I'm not sure.

    Any ideas? Any *evidence* one way or another?


    seberino, Jul 5, 2005
    1. Advertisements

  2. If that means that I have to learn a new programming language for every
    program I'd like to apply a minor fix/customization to: not a good idea.
    Probably not just for the casual hacker like me, but also for the
    maintainance phase of a project, when the former lead gurus lost interest
    and/or employment.
    Benjamin Niemann, Jul 5, 2005
    1. Advertisements

  3. seberino

    Joost Jacob Guest

    Very hard to say.

    LISP has OOP too, Google for CLOS.

    Operator overloading is something to avoid anyway, IMHO, just like
    static typing is something to avoid if you need fast development, on
    schedule and the like.

    LISP has one thing that Python does not have: LISP code is LISP data.
    A thorough study comparing LISP and Python in this respect would be
    Joost Jacob, Jul 5, 2005
  4. seberino

    Dave Brueck Guest

    Well, his Viaweb company was founded in about '95, right? So he probably just
    used Lisp because Python wasn't as well known yet. ;-)

    IMO one of Python's strengths over Lisp is that it plays well with many other
    technologies. It should be remembered that Graham's use of Lisp in Viaweb was in
    building a web application, so that Lisp's main links to the "outside world"
    were the filesystem and Apache. They didn't use a database, and Apache had to be
    modified in order to work with Lisp.
    Dave Brueck, Jul 5, 2005
  5. seberino

    seberino Guest


    That is what I thought too. It makes sense but I wasn't sure. Still
    The problem is that questions like 'What lang is fastest to develop
    are hard to answer definitively.

    seberino, Jul 5, 2005
  6. seberino

    Peter Hansen Guest

    That's because the answer depends on lots of context such what is the
    problem domain and who is the programmer. Really, it's an impossible
    question to answer. Measuring two different programmers with two
    different languages would give useless results, since you can't ensure
    the two programmers are equally capable. Using the same programmer for
    the same problem with two different languages doesn't work since she
    would learn from doing it the first time and inevitably have advantages
    in the second time through. Using two different problems is of course
    pointless as well.

    Ultimately, however, the question needs no answer, since "speed of
    development" is not the only or even the most important factor in
    development. Take into account issues of maintainability, quality of
    code, performance and such, and you've muddied the question even more,
    making this a religious question and one that has no meaningful answer,
    nor a need to be answered in a simple way.

    For *me*, Python has proven to be the fastest language to develop in, so
    far, but it's quite possible to imagine another language in the future
    which I might learn which would be -- for me -- even faster, at least
    for certain types of problems. (But so what? :) )

    Peter Hansen, Jul 6, 2005
  7. Well, for me, I was playing around with lisp and developing in python
    for my little scripts until I finally hit something that could leverage
    a lisp macro to create a new type of iterator. After that things moved
    foward at a rapid speed. Another point in lisp's favor is that I prefer
    nested s-expressions to the sometimes ugly mashup of functional and OO
    calls that I end up creating in python.

    On the other hand, python benefits from a much richer standard library,
    so some of the things you take for granted in python such as
    string.split(None,3) need to be found or created.
    Kirk Job Sluder, Jul 6, 2005
  8. seberino

    Mike Meyer Guest

    True. You might start by asking which lets you write the fewest LOC,
    as studies during the 70s showed that programmers tended to write the
    same number of LOC/day, regardless of the language chosen.

    The problem with the LOC measurement is that the most productive days
    are the ones where you refactor and eliminate a thousand LOC. That
    sort of throws the whole thing off.

    Mike Meyer, Jul 6, 2005

  9. With Lisp or Forth, a master programmer has unlimited power and
    expressiveness. With Python, even a regular guy can reach for the

    Raymond Hettinger, Jul 6, 2005
  10. FWIW, Google's answer to that question is C++, Java, and Python. For
    any given problem, any of the three are acceptable. Each programmer or
    engineering team gets to decide based on his or her language


    * Source: Greg Stein's keynote address at PyCon 2005.
    Raymond Hettinger, Jul 6, 2005
  11. seberino

    Fuzzyman Guest

    Fuzzyman, Jul 6, 2005
  12. Fuzzyman:

    Python is *also* for mediocre programmers. I see this as a
    strength, not as a weakness.

    Michele Simionato
    Michele Simionato, Jul 6, 2005
  13. +1 QOTW
    Andrew Durdin, Jul 6, 2005
  14. seberino

    Fuzzyman Guest

    Fair enough ;-)

    I'd like to discover the power of Lisp, but I have a limited amount of
    time to sink into programming... so maybe I'm better off putting my
    energies and imagination into Python.

    *A language is a medium of expression.* - Paul Graham

    All the best.

    Fuzzyman, Jul 6, 2005
  15. But sometimes I get the impression people want it to evolve
    so it is only for mediocre programmers.
    Antoon Pardon, Jul 6, 2005
  16. seberino

    Larry Bates Guest

    You don't say how long it took to develop the "macros" but
    you should see what kind of website an experienced Zope/Plone
    programmer can whip up in a few minutes.

    Acceleration in programming has always been about the "Standard
    Library" (not only Python's standard library but also your
    standard library). I'm talking about stable, debugged,
    documented macros, functions and classes that the programmer can
    use to quickly do very complex tasks. I discovered this well
    over 30 years ago and taught many young programmers and
    University students this very important "trick". As you write
    software you will eventually come across common routines that
    are used in almost every software package (logging, reading
    from CSV files, date/time manipulation, ...). If you have lots
    of these to choose from in your library, you will produce code
    10-100 times faster than those that start over every time AND
    the code will be MANY times more reliable because you are
    utilizing stable code that has been debugged over a long period
    of time. You will also be producing code that is more
    "maintainable". Discovered a bug in a library routine? Fix it
    and then it is fixed in 100's (or 1000's) of existing programs
    that use it.

    -Larry Bates
    Larry Bates, Jul 6, 2005
  17. seberino

    Zachery Bir Guest

    Zope/Plone (as frameworks) represent exactly the kinds of DSLs people
    have been building with Lisp for decades. Shoulders of giants, and all
    that. Lisp has web app frameworks as well: Uncommon Web and BKNR, to
    name two.

    Zachery Bir, Jul 6, 2005
  18. seberino

    Tom Anderson Guest

    As in:

    Perhaps the real question, then, is which language allows you to delete
    lines of code most quickly.

    Tom Anderson, Jul 6, 2005
  19. seberino

    Peter Hansen Guest

    No, then the question becomes "which language allows you to quickly
    write very many lines of code which then have to be deleted".

    Of course, writing those lines manually would be silly if you could
    automate the process. After all, the lines of code aren't required, so
    they don't really have to do anything, do they?

    So naturally Assembly would be the proper way to get maximum performance
    out of your automatic code writing program.

    Therefore Assembly is clearly the fastest development language.

    Peter Hansen, Jul 6, 2005
  20. Actually, Google's answer to that question is something called "ILOG
    CPLEX", followed by Visual Basic, English as a second language, PHP, and
    "Holt Software Associates". ;-)

    Given this finding, I'm not sure I should put much weight into Google
    search results anymore ...
    Rocco Moretti, Jul 6, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.