merits of Lisp vs Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lars Rune Nøstdal

    Re: merits of Lisp vs Python

    On Sat, 09 Dec 2006 20:36:02 +1100, Steven D'Aprano wrote:
    On Fri, 08 Dec 2006 23:38:02 -0800, Wolfram Fenske wrote:
    >
    >if Common Lisp didn't have CLOS, its object system, I could write my own
    >as a library and it would be just as powerful and just as easy to use as
    >the system Common Lisp already provides. Stuff like this is impossible
    >in other languages.
    >
    Dude. Turing Complete. Don't you Lisp developers know anything about
    computer science?
    >
    Anything any language can do is possible in any other language, if you are
    willing to write your own libraries.
    *lol* Good luck with that attitude:


    ...or did you forget to add "in theory"; which is of course what everyone
    already knows as they see their compilers do it every day.

    --
    Lars Rune Nøstdal


    Comment

    • Blair P. Houghton

      Re: merits of Lisp vs Python

      Python doesn't annoyingly rip you out of the real world to code in it.

      Anyone looking at a python script can get a sense of where it's going.

      --Blair

      Comment

      • Ken Tilton

        Re: merits of Lisp vs Python



        Steven D'Aprano wrote:
        On Fri, 08 Dec 2006 23:38:02 -0800, Wolfram Fenske wrote:
        >
        >
        >>if Common Lisp didn't have CLOS, its object system, I could write my own
        >>as a library and it would be just as powerful and just as easy to use as
        >>the system Common Lisp already provides. Stuff like this is impossible
        >>in other languages.
        >
        >
        Dude. Turing Complete. Don't you Lisp developers know anything about
        computer science?
        We just know the Turing Complete thing cannot be used to duck language
        feature comparisons because the whole point of language comparison is
        "how much pain does each language spare me?", where a Turing machine is
        ranked as the ultimate in programming pain.

        This might be because the whole point of a programming language is to
        spare us the pain of toggling switches on the back of an ENIAC.
        >
        Anything any language can do is possible in any other language,...
        At what cost? <hint>

        ken

        --
        Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

        "Well, I've wrestled with reality for thirty-five
        years, Doctor, and I'm happy to state I finally
        won out over it." -- Elwood P. Dowd

        "I'll say I'm losing my grip, and it feels terrific."
        -- Smiling husband to scowling wife, New Yorker cartoon

        Comment

        • Ken Tilton

          Re: merits of Lisp vs Python



          Steven D'Aprano wrote:
          On Fri, 08 Dec 2006 22:02:59 +0200, Alex Mizrahi wrote:
          >
          >
          >>you have an expression 3 + 4 which yields 7.
          >>you have an expression 4 * 1 which yields 4.
          >>if you paste 3 + 4 in place of 1, you'll have 4 * 3 + 4 = 16. as we know, *
          >>is commutative, but 3 + 4 * 4 = 19.
          >>so result depends on implicit operator precendence rules.
          >>
          >>in lisp, if you paste (+ 3 4) in (* 4 1), you'll have (* 4 (+ 3 4)), and it
          >>does not depend on order of operands, (* (+ 3 4) 4) yields same results. you
          >>do not have to remember precendence rules
          >
          >
          Speaking as somebody who programmed in FORTH for a while, that doesn't
          impress me much. Prefix/postfix notation is, generally speaking, more of a
          pain in the rear end than it is worth, even if it saves you a tiny bit of
          thought when pasting code.
          >
          Except, of course, it doesn't really save you any thought. You can't just
          expect to paste an expression randomly into another expression and have it
          do the right thing.
          Tell that to the unlimited number of monkeys I have over hear generating
          my next application. You might also read what I wrote earlier in this
          thread about how I leveraged the parens thing to edit code in logical
          chunks instead of chunks of text. If you think about it, that is exactly
          how code should be edited.

          But I am fascinated: Python text can be edited randomly because it uses
          infix? Or did you just throw in randomly because your point sounded so
          weak without it? :)
          Oh, it will compile all right. But it won't do the
          right thing! Since you -- not the compiler -- have to understand the
          semantics of what you are pasting where, and paste the right expression
          into the right place, the effort saved by not using infix notation is less
          than the effort needed to mentally translate between prefix and infix.
          Has it ever occurred to you that you might be the one translating?
          Because you are, you just do not know it. The only time I translate is
          when I have to express a multi-operator math formula in Lisp:

          (eql y (+ (* m (expt x 2)) b))

          I threw an exponent into the slope-intercept form of a line for the heck
          of it. Gotta tell you, I do not have to code a lot of math formulas in
          Lisp, and I would definitely download and infix-eating macro if I did.

          Aside from that, you are the one translating. Prefix is terribly natural
          to the mind. Think about it. Add it all up. Add the tax and price and
          tip. Those are imperative, this one functional: the sum of the parts.
          The only time one hears infix in speech is when one is reading math
          notation. So... put two and two together.
          >
          If you are one of those people who actually think in prefix notation, then
          I raise my hat to you while backing away slowly.
          Be careful backing away from yourself. :) I remember talking to a Welsh
          chap who had experienced the transition to a decimal system for money
          from the good old days of shillings, etc. He said he still had to
          translate pennies to shillings, even though the decimal system was less
          ornate. What mattered was the habit, not the clarity of representation.

          The good news is in my earlier point: you already are using prefix. Even
          in programming. What does a functionall look like? fn(p1,p2,p3) Lisp
          just moved the left parenthesis in front of the fn so the logical chunk
          (function+param eters) is also a textual chunk neatly packaged and
          editable between matching parens.
          >
          (And actually, I'll give you one point: I've been hitting my head against
          a brick wall over a particular problem, and I think your email just gave
          me a clue how to solve it. Sometimes prefix/postfix notation is the right
          tool for the job. See, I can learn from Lisp.)
          I think that was A Message From God(tm).

          :)

          ken

          --
          Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

          "Well, I've wrestled with reality for thirty-five
          years, Doctor, and I'm happy to state I finally
          won out over it." -- Elwood P. Dowd

          "I'll say I'm losing my grip, and it feels terrific."
          -- Smiling husband to scowling wife, New Yorker cartoon

          Comment

          • Ken Tilton

            Re: merits of Lisp vs Python



            Steven D'Aprano wrote:
            On Fri, 08 Dec 2006 23:38:02 -0800, Wolfram Fenske wrote:
            >
            >
            >>if Common Lisp didn't have CLOS, its object system, I could write my own
            >>as a library and it would be just as powerful and just as easy to use as
            >>the system Common Lisp already provides. Stuff like this is impossible
            >>in other languages.
            >
            >
            Dude. Turing Complete. Don't you Lisp developers know anything about
            computer science?
            >
            Anything any language can do is possible in any other language, if you are
            willing to write your own libraries.
            I do not think you know what are macros. You are talking about
            functionality, macros are about the syntax. To achieve what Lisp
            developers do with macros you would need to write a preprocessor (and
            indeed this has been done when the need was great enough) to run thru
            the code expanding all the uses of the preprocessor language. But then
            your edit-run cycle is broken unless your IDE will let you specify a
            preprocessor and take care of seamlessly running it, but then what do
            you debug? And then you cannot just toss off a macro, it becomes an
            exercise in compiler development and now you have dozens of
            preprocessors running on each cycle. Ewwwww.
            And debug them. Let's not forget the
            debugging and testing, unless you'd like us to believe that Lisp code
            never contains bugs. Lisp developers so often gloss over that: "Oh,
            feature X is *easy*, I could write it in a couple of macros. Two or three.
            Maybe thirty. Or forty, max. And they would work the right way first time.
            Do you really talk to a lot of Lisp developers, or were you making that
            up? :)

            Of course implementing an object system is a big job. Your fantasy about
            Lisp programmers misses the point to which you respond: after they had
            done all the work to implement an object system, they were able to make
            it look like Lisp had always had CLOS, without changing the compiler.

            Keep those fat pitches coming. :)

            ken

            --
            Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

            "Well, I've wrestled with reality for thirty-five
            years, Doctor, and I'm happy to state I finally
            won out over it." -- Elwood P. Dowd

            "I'll say I'm losing my grip, and it feels terrific."
            -- Smiling husband to scowling wife, New Yorker cartoon

            Comment

            • David Golden

              Re: merits of Lisp vs Python

              Paul Rubin wrote:
              Forth was always unreadable to me but I never did much. I thought its
              aficionados were silly. Yes if you have a complicated math expression
              in Lisp, you have to sit there for a moment rearranging it in infix in
              your mind to figure out what it says. The point is that such
              expressions aren't all that common in typical Lisp code.
              >

              I find Lisp, Forth and classic funny-symbol APL relatively readable
              (well, once you've learned the funny symbols in the APL case) That
              spans prefix/postfix/infix... The commonality is simple evaluation
              order, no damn precedence rules. I can _cope_ with precedence rules,
              I'm not a moron, but I prefer languages that don't make heavy use of
              them. Well, more accurately, sources that don't, but most coders in
              communities of languages-with-lots-of-precedence-rules consider
              reliance on those precedence rules in source code idiomatic. And
              precedence rules, once you get beyond a few (sometimes rather
              misleading) similarities to the ones that most people are made to learn
              early on for arithmetic notation, can vary a lot from computer language
              to computer language.

              Comment

              • hg

                Re: merits of Lisp vs Python

                JShrager@gmail. com wrote:
                Okay, since everyone ignored the FAQ, I guess I can too...
                >
                Mark Tarver wrote:
                >How do you compare Python to Lisp? What specific advantages do you
                >think that one has over the other?
                >
                (Common) Lisp is the only industrial strength language with both pure
                compositionalit y and a real compiler. What Python has is stupid slogans
                ("It fits your brain." "Only one way to do things.") and an infinite
                community of flies that, for some inexplicable reason, believe these
                stupid slogns. These flies are, however, quite useful because they
                produce infinite numbers of random libraries, some of which end up
                being useful. But consider: Tcl replaced Csh, Perl replaced Tcl, Python
                is rapidly replacing Perl, and Ruby is simultaneously and even more
                rapidly replacing Python. Each is closer to Lisp than the last; the
                world is returning to Lisp and is dragging the flies with it.
                Eventually the flies will descend upon Lisp itself and will bring with
                them their infinite number of random libraries, and then things will be
                where they should have been 20 years ago, but got sidetracked by Tcl
                and other line noise.
                pffffffff !

                Comment

                • Ken Tilton

                  Re: merits of Lisp vs Python



                  Steven D'Aprano wrote:
                  On Sat, 09 Dec 2006 02:29:56 -0500, Ken Tilton wrote:
                  >
                  >
                  >>
                  >>David Lees wrote:
                  >
                  >
                  >>Those raving about
                  >>Lisp are quite accomplished at all those other languages, and know about
                  > what they are talking.
                  >
                  >
                  Such a sweeping generalization. Every person who raves about Lisp is also
                  accomplished with other languages. Yeah, right. I believe you, even if
                  millions wouldn't.
                  Ah, but that is because you are not a careful thinker, you just like
                  sounding off on Usenet. Me, too!

                  Think, Steve, think: do you think we pay the rent with /Lisp/ jobs?!

                  If logic does not work for you, try this:



                  Behind each sound bite is a full survey response, one question being
                  "what other languages do you use?".

                  >>I doubt the Pythonistas weighing in on this
                  >>thread ever got far at all with Lisp, so... should they really be
                  >>offering comparative analysis?
                  >
                  >
                  I hit my hand with a hammer once.
                  Cool, first you use the lame Turing Completeness thing, now you are
                  arguing by analogy, which does not work because now we have to argue
                  about how well the analogue maps onto the topic.

                  When I switched Lisps after several years of Lisp I also had to switch
                  IDEs (not using Emacs+ILisp). I hated the new IDE. I also told myself to
                  wait thirty days before worrying about it, since obviously it might just
                  be a matter of habit. Now when I port things back to the first Lisp I
                  hate that IDE (except I know a couple of weeks would turn it around).

                  Now it may be distressing to you that I am talking about something
                  closer to programming languages than is hammering ones hand, and for
                  that I apologize in advance. :)

                  I didn't keep going until I was an
                  expert in hitting-own-hand-with-hammer before deciding that hitting my
                  hand with a hammer was not for me. Did I do the wrong thing? Should I have
                  kept going until I was an expect at it?
                  >
                  (Of course, writing Lisp isn't precisely like hitting one's hand with a
                  hammer. With the hammer, the endorphins kick in eventually, and it can
                  become quite pleasant...)
                  >
                  >
                  >
                  >>Personally, I never like Lisp syntax;
                  >>>Clearly some people, some fanatic judging by this thread :) think easily
                  >>>in prefix. I am not one of them.
                  >>
                  >>Yeah, you are, you just did not use it heads down for a month.
                  >
                  >
                  The sheer arrogance of this claim is astounding.
                  >
                  Actually, this is comp.lang.lisp. It isn't astounding at all.
                  Exactly, and Usenet. Not the Supreme Court. We can speak casually. We
                  can also speak cordially. <hint>
                  >
                  I don't know, maybe lisp coders actually are more intelligent than
                  ordinary mortals,
                  No, it's the Lisp that makes them so effective. I was joking in my
                  original remark. But not about Lisp programmers being better looking. :)
                  but it has been my experience that they have absolutely
                  no grasp whatsoever of the way most (many? some?) people think. And I'm
                  not talking about can't-walk-and-think-at-the-same-time people either, I'm
                  talking about bright, intelligent people who, nevertheless, don't agree
                  with lisp coders.
                  As you will soon realize because you are such an open,
                  intellectually-honest person and will do the reading I recommended, most
                  of us came to Lisp late in our programming careers, having used and
                  excelled at (in my case) Apple Integer Basic, Microsoft Basic, 6502
                  Assembler, COBOL, any DEC Basics, C, Logo, and now Lisp (chosen over the
                  new C++ because the latter seemed like evry bit the horror it turned out
                  to be). I have done enough Python to appreciate the cleanliness of the
                  code and its power, and enough Java... well, after Lisp it is impossible
                  to find anything in some other language that would tempt one to work
                  much in it.

                  My point is that we grasp what you think because we /are/ you, we have
                  worked alongside you, and we are very good at your language. And we use
                  Lisp and gloat about it and piss everyone off with our smugness. It
                  can't be helped--Lisp is that good.
                  >>The way
                  >>to tell if you spent enough time on Lisp is to look at Lisp code. If you
                  >>see any parentheses, you have not spent enough time. They disappear in a
                  >>month.
                  >
                  >
                  If the parentheses are that meaningless, why do you need them?
                  Meaningless? Who said that? Did you say that? Someone said that. :)

                  I said they disappear. I am not looking at parens, I am looking at the
                  code structure, as manifested by (you'll like this) the indentation, the
                  indentation provided automatically when I kerplunk control-shift-P (I
                  think, my fingers know).

                  You like analogies. When i tried on my first glasses I said "I can see
                  the frames!". the glasses guy said, "That is because you are looking for
                  them." Something like that. With the editor handling the parens 90% of
                  the time, I do not have to thnk about or look for them.

                  btw, change all the ()s to []s and I /do/ see them. Possibly they would
                  go away with time, but I have a hunch that []s might not go away, two
                  cornery or something.
                  >
                  >
                  >
                  >>The typical Pythonista values clean code but trembles in the face of
                  >>macros, which exist to hide boilerplate.
                  >
                  >
                  Funny, when I write code, I try to remove boilerplate, not hide it.
                  Boilerplate does not mean meaningless. You cannot remove it. It is
                  absolutely necessary. But it has blanks that must be filled in
                  differently for each use of the boilerplate. With macros, one supplies
                  just the fill-ins and the name of the boilerplate, but in a way a
                  function cannot handle.

                  The last time we went thru this a Pythonista finally said, Oh, I get it.
                  These five lines of code I have to write all the time (two setup, one
                  func call, two cleanup) can be collapsed into one or two. The thread
                  will be hard to miss in Google groups (two years back?) and the epiphany
                  appears right at the end of the thread. <hint>

                  >>That means the only thing
                  >>showing in any given block of code is exactly the interesting variable
                  >>and function names. Talk about readability.
                  >
                  >
                  Yes. And your point is?
                  You would love macros if Python had them.

                  >>>Computer languages are tools and
                  >>>everyone should pick the ones that they are most comfortable and
                  >>>productive with.
                  >>
                  >>No, languages are not interchangeable .
                  >
                  >
                  Perhaps you should consider what the term "Turing complete" implies.
                  I have destroyed this elsewhere, but in case you missed it: HLLs exist
                  precisely to distance us from having to program Turing machines
                  directly, and are to be judged precisely on how well they do that, so
                  this fig leaf offers no cover.
                  >
                  >
                  >
                  >>Python is a fine language, but
                  >>Lisp is much more expressive/powerful.
                  >
                  >
                  Maybe so. A bulldozer is a lot more powerful than a tack-hammer, but if
                  somebody suggested using a bulldozer to lay carpet, I'd politely show them
                  to the door. Sometimes more power isn't better.
                  I thought we agreed that analogies are useless because they become their
                  own debate? :) Again, power means maximizing the ratio between how much
                  time am I thinking about the problem I am trying to express and how much
                  time am I thnking about your beloved Turing machine.

                  Not sure how I would say that in infix.

                  :)

                  ken

                  --
                  Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

                  "Well, I've wrestled with reality for thirty-five
                  years, Doctor, and I'm happy to state I finally
                  won out over it." -- Elwood P. Dowd

                  "I'll say I'm losing my grip, and it feels terrific."
                  -- Smiling husband to scowling wife, New Yorker cartoon

                  Comment

                  • Ken Tilton

                    Re: merits of Lisp vs Python



                    Alex Mizrahi wrote:
                    (message (Hello 'Ken)
                    (you :wrote :on '(Sat, 09 Dec 2006 04:26:02 -0500))
                    (
                    >
                    KTkeep the Pythonistas from straying. But you have an excuse: Lispniks
                    KTalways /talk/ about macros giving us the ability to create a DSL. But
                    KTno one does. :)
                    >
                    certainly there's no reason to make a new DSL each day, but sometimes they
                    are good.
                    i've recently posted an example of DSL to do queries to RDF data base -- i
                    find it's very helpful.
                    That is different. Your very objective /was/ a language. Naturally, you
                    created one. I am talking about PGs suggestion that the best way to
                    solve a problem is to create a language for that problem and then use
                    it. What I think happens more often is the other thing Graham said:
                    building up CL to be a better language for the problem. So the language
                    is still predominantly and visibly CL, and here and there are chunks of
                    macrology hiding a crapload of boilerplate.

                    ken

                    --
                    Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

                    "Well, I've wrestled with reality for thirty-five
                    years, Doctor, and I'm happy to state I finally
                    won out over it." -- Elwood P. Dowd

                    "I'll say I'm losing my grip, and it feels terrific."
                    -- Smiling husband to scowling wife, New Yorker cartoon

                    Comment

                    • Ken Tilton

                      Re: merits of Lisp vs Python



                      Bjoern Schliessmann wrote:
                      Ken Tilton wrote:
                      >
                      >
                      >>Note also that after any amount of dicing I simply hit a magic key
                      >>combo and the editor reindents everything. In a sense, Lisp is the
                      >>language that handles indentation best.
                      >
                      >
                      Erm ... because there's an editor for it that indents automatically?
                      Or did I miss the point?
                      I think so, but you did not say enough for me to understand /your/
                      point. It sounded like you were using sarcasm to point out to me exactly
                      what I had just said.

                      We might want to punt on this. :)

                      ken

                      --
                      Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

                      "Well, I've wrestled with reality for thirty-five
                      years, Doctor, and I'm happy to state I finally
                      won out over it." -- Elwood P. Dowd

                      "I'll say I'm losing my grip, and it feels terrific."
                      -- Smiling husband to scowling wife, New Yorker cartoon

                      Comment

                      • Steven D'Aprano

                        Re: merits of Lisp vs Python

                        On Sat, 09 Dec 2006 14:00:10 +0000, Timofei Shatrov wrote:
                        On Sat, 09 Dec 2006 20:36:02 +1100, Steven D'Aprano
                        <steve@REMOVE.T HIS.cybersource .com.autried to confuse everyone with this
                        message:
                        >
                        >>On Fri, 08 Dec 2006 23:38:02 -0800, Wolfram Fenske wrote:
                        >>
                        >>if Common Lisp didn't have CLOS, its object system, I could write my own
                        >>as a library and it would be just as powerful and just as easy to use as
                        >>the system Common Lisp already provides. Stuff like this is impossible
                        >>in other languages.
                        >>
                        >>Dude. Turing Complete. Don't you Lisp developers know anything about
                        >>computer science?
                        >
                        Here, you've basically shot yourself in the ass. Appealing to Turing
                        completeness when talking about programming language features is about the
                        dumbest thing you can make. In Turing sense, a program is simply a function that
                        takes an argument and returns a value. It doesn't say anything about how this
                        function was implemented. It could be Turing machine, lambda calculus, Markov
                        chains or whatever else. All these methods produce the same set of programs, but
                        that doesn't mean you could implement lambda in Turing machine for example.
                        What exactly are you trying to say here? Is this a comment about the
                        relative practicality of writing code in a Turing machine versus
                        high-level languages, or are you implying that lambda calculus is "bigger"
                        than any Turing-complete language?

                        If you're talking about practicality, then of course you're correct, not
                        all languages are equally expressive. Some languages are not expressive
                        enough. Some languages are too expressive. No language is optimal for all
                        people for all tasks.

                        Is is time for someone to read his computer science books again?
                        Probably. Would you like to borrow mine?

                        Look, all snarkiness aside, it just isn't true that "stuff like this is
                        impossible in other languages". If Wolfram Fenske had said "stuff like
                        this isn't easy in many other languages" he would have been right. And if
                        he had said "and stuff like this carries risks as well as benefits" he
                        would have come across as less of a language fanatic.

                        One of the risks with Python is the ease with which you can modify the
                        built-ins. An expression like list(2, 3, 4) doesn't necessarily create a
                        list from 2, 3, and 4, because the built-in list could be redefined.
                        (In practice, that's not often a real problem, because experienced
                        Python developers simply learn not to needlessly or confusingly shadow
                        built-ins. It's not the best system, but it works well enough in
                        practice.) But at least the basic syntax and keywords of the language are
                        known to be constant.

                        With Lisp macros, even that isn't guaranteed. Now, if Lispers would say
                        "Oh yes, macros give you great power, and with great power comes great
                        responsibility. Be careful." then, no doubt, we'd take you guys more
                        seriously. But we don't hear that -- we hear Lispers going on and on about
                        how great it is that they can easily redefine every corner of the
                        language. Do you blame people for *believing them* and imagining that
                        reading Lisp code is like following some ghostly will-o-the-wisp across a
                        swamp, where nothing is what it seems and the landscape is forever
                        shifting?

                        Now, if you want to tell me that, despite all the talk, Lisp coders don't
                        actually create new syntax or mini-languages all that often, that they
                        just use macros as functions, then the question becomes: why do you need
                        macros then if you are just using them as functions? Why not use functions?


                        --
                        Steven.

                        Comment

                        • Wade Humeniuk

                          Re: merits of Lisp vs Python

                          tmh wrote:
                          This is from the perspective of an aerospace engineer who passed
                          through python several years ago on the way to lisp. Futhermore, this
                          is a 2 glass of wine response.
                          >
                          <snip>

                          Thanks for the comments. I think it is great that you took a "harder
                          and less travelled way". It may be that some people get to a point
                          where they are either tired or think they know everything. Or.. their
                          brains just harden up and they become old dogs.

                          There seems to be a recurring theme to many of the posts in this thread
                          about syntax and readability. Some of it is "If I can not instantly
                          read and understand what the code is doing then something is wrong
                          with it". As if holding oneself as the standard of what is good and
                          correct is the only way. If you see something and it
                          is not readily apparent what it is, then that is a sign than something
                          interesting may be going on. I got into Lisp because when I
                          looked at it, I did not understand. I did not think WTF! but thought
                          that something was going on and maybe I was cheating myself if I
                          brushed it aside.

                          There is also some disdain expressed about badly written programs.
                          Why? They may be that way for some very good reasons, it is folly
                          to think that programs have to be simple, obvious and elegant. I find
                          interesting that a programmer got out their comfort zone and attempted
                          something. Its better than the ones with the big egos who play it safe
                          so they do not appear to be a fool.

                          Wade

                          Comment

                          • Ken Tilton

                            Re: merits of Lisp vs Python



                            Steven D'Aprano wrote:
                            >
                            But Lisp's syntax is so unlike most written natural languages that that it
                            is a whole different story. Yes, the human brain is amazingly flexible,
                            and people can learn extremely complex syntax and grammars (especially if
                            they start young enough) so I'm not surprised that there are thousands,
                            maybe tens or even hundreds of thousands of Lisp developers who find the
                            language perfectly readable.
                            >
                            But that isn't to say that the syntax of Lisp is for everybody.
                            yeah, I think it is. Folks don't vary that much. If every Lisp
                            programmer also reports parens disappearing at about thirty days, any
                            given non-Lispnik can pretty much bet on the same experience.

                            And since no one can produce a witness who worked fulltime on Lisp for
                            thirty days and gave up on it because it was a great language but they
                            could not handle the syntax, or a witness who stayed with Lisp because
                            it is a great language even though to this day they have trouble reading
                            the synatx...
                            Far from
                            it -- I'd be willing to bet that Lisp developers are a self-selected group
                            of far above average intelligence.
                            I think the early adopter is distinguished not so much by greater
                            intelligence as by restlessness and rebelliousness and a little lunacy.
                            We lack the knack of happiness. Many of the stories on the RtL reveal
                            folks who sought A Better Way after mastering other languages. And by
                            Better Way, sorry, we mean "why do I have to forever worry about the
                            damn paper tape on this Turing machine!". We do not really like
                            programming, we like thinking about problems and using a computer to
                            solve them.
                            That would explain why so many of them
                            seem to be so much more comfortable with higher-order functions than most
                            other people -- even intelligent people.
                            >
                            (Looking back, I'm embarrassed about my first reaction to factory
                            functions all those years ago. Hiss hiss spit. But even with added
                            familiarity, there comes a time where one has to question the benefit of
                            sufficiently high-order functions. If you are writing a factory function
                            that returns factory functions that return factory functions that return
                            the functions that you needed in the first place, chances are you really
                            need to rethink your tactics.)
                            >
                            If I'm right, then maybe Lisp is "better" in some absolute sense, *for
                            those who can use it*. For those who can't, it isn't just a matter of
                            (say) the syntax being hard to read because it is unfamiliar, but it
                            being objectively harder to use.
                            >
                            An interesting study would be to track people's eyeballs as they read
                            code, ...
                            I spend about 90% of my time thinking and writing code, and read it only
                            to understand how something works or why it broke. And then I am looking
                            at parentheses no more than you are looking at the lines of resolution
                            on a TV when watching Baywatch. I am looking at a mechanism and how it
                            works.
                            ...or look at how much oxygen their brain uses. Do Lisp coders do more
                            work to read Lisp than Python coders do to read Python? I suspect they do,
                            but successful Lisp coders don't notice.
                            My suspicion goes the other way, and is based not on punctuation, rather
                            on imperative vs functional. In Lisp every form returns a value, so I do
                            not have all these local variables around that, in the strecth of an
                            interesting function, take on a stream of values and transformations to
                            finally come up with some result, meaning to understand code I have to
                            jump back and forth thru the code to see the lineage of a value and
                            figure out its net semantics. Too much like work.
                            Everybody else does, and
                            gravitate to languages which might not be "better" but are "good enough".
                            No, they gravitated to a language that was closer to what they already
                            knew, C or Java (which also mimicked C to pick up those users). Later
                            charms of Python were a great community and library support. Lisp simply
                            does not have the latter, one is forever rolling one's own bindings to C
                            libs.
                            (If my post leads to any Lisp developer's already swollen head exploding
                            from pride, my job here is done *wink*)
                            They can't get any bigger. :)

                            ken

                            --
                            Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

                            "Well, I've wrestled with reality for thirty-five
                            years, Doctor, and I'm happy to state I finally
                            won out over it." -- Elwood P. Dowd

                            "I'll say I'm losing my grip, and it feels terrific."
                            -- Smiling husband to scowling wife, New Yorker cartoon

                            Comment

                            • JShrager@gmail.com

                              Re: merits of Lisp vs Python

                              Carl Banks wrote:
                              JShrager@gmail. com wrote:
                              Okay, since everyone ignored the FAQ, I guess I can too...
                              [snip]
                              What Python has is stupid slogans
                              ("It fits your brain." "Only one way to do things.") and an infinite
                              community of flies that, for some inexplicable reason, believe these
                              stupid slogns.
                              >
                              IOW, you posted the FAQ so you could appear to have highest moral
                              ground, then you ignore your own advice and promptly head to the very
                              lowest ground with ad hominem insults.
                              You're right, in part: My implicitly linking Python's pros or cons with
                              its stupid marketing hype is, I think, an ad hominem argument. But I
                              don't see a moral issue here; the purpose of posting the FAQ was merely
                              to try to stop the fight. It failed.

                              Regardless, there was some content in my post which you have not
                              addressed:

                              To wit:

                              1. Lisp is the only industrial strength language with pure
                              compositionalit y, and that this makes it suprior to Python. We don't
                              have to debate this because it's being debated elsewhere in this
                              thread.

                              2. Ruby, which is closer to Lisp than Python, is beginning to eat
                              Python's lunch. We don't have to debate this either because George has
                              kindly gave support to it through posting a survey that made this point
                              quite nicely; Thanks, George! :-)

                              BTW, for the record, I don't have anything particularly against Python
                              aside from its stupid marketing hype and a bit of jealousy over those
                              flies building libraries which I wish we had in Lisp. I've made the
                              choice uncountable times between PERL, Python, and Tcl when I didn't
                              have Lisp as an option, and I have always chosen Python in these cases,
                              even though I can program in any of these. (Although I'm probably going
                              to start using Ruby instead of Python in these cases, but I'm not
                              really expert in it yet.)

                              (Actually, in many cases I can get away with Emacs keyboard macros
                              where others would program in PERL or Python, although not always.)

                              Comment

                              • Ken Tilton

                                Re: merits of Lisp vs Python



                                Steven D'Aprano wrote:
                                Some languages are too expressive.
                                :)
                                Look, all snarkiness aside, it just isn't true that "stuff like this is
                                impossible in other languages". If Wolfram Fenske had said "stuff like
                                this isn't easy in many other languages" he would have been right.
                                Remember, Lisp macros are like being able to run a preprocessor on an
                                ad-hoc basis. Without Lisp compilers (er, should I say the Lisp
                                "reader"?) understanding macros and macro functions, not even Lisp could
                                transform source code this way.

                                We won't have an intelligent discussion on macros until this gets better
                                understood. Macros are not about what one can do at run-time, they are
                                about what happens at compile time. If your compiler/preprocessor/IDE
                                are not going to cooperate, then embedding a preprocessed language in
                                Python is so hard as to be unfeasible.

                                I also would not quibble over "impossible " vs. "incredibly hard". The
                                bottom line is that at a pretty low level hard becomes "aint gonna happen".
                                And if
                                he had said "and stuff like this carries risks as well as benefits" he
                                would have come across as less of a language fanatic.
                                >
                                One of the risks with Python is the ease with which you can modify the
                                built-ins. An expression like list(2, 3, 4) doesn't necessarily create a
                                list from 2, 3, and 4, because the built-in list could be redefined.
                                (In practice, that's not often a real problem, because experienced
                                Python developers simply learn not to needlessly or confusingly shadow
                                built-ins.
                                Well, duuhhhhh. This the Great Strawman, that Lisp programmers (a) love
                                having a powerful language (b) so they can produce unreadable code. This
                                nonsense is an implicit concession that you have no point at all.
                                It's not the best system, but it works well enough in
                                practice.) But at least the basic syntax and keywords of the language are
                                known to be constant.
                                >
                                With Lisp macros, even that isn't guaranteed. Now, if Lispers would say
                                "Oh yes, macros give you great power, and with great power comes great
                                responsibility. Be careful."
                                I have to admit you are probably still catching up on what I have
                                written today.
                                then, no doubt, we'd take you guys more
                                seriously. But we don't hear that -- we hear Lispers going on and on about
                                how great it is that they can easily redefine every corner of the
                                language.
                                You have this tendency as your paragraphs grow to get sillier and
                                sillier and make up more and more hobgoblin crap, I suppose as you sense
                                the weakness of your case. Can you point to where someone said that? No,
                                of course not. Get a grip, will you, this could be a useful cultural
                                exchange, but not with your hysterics.
                                why do you need
                                macros then if you are just using them as functions? Why not use functions?
                                Hint: famous Lisp style rule: never use a macro where a function will do.

                                Not sure it is worth wasting more time on you at this point or I would
                                offer examples. Could you calm down a bit and stop making things up?

                                ken

                                --
                                Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

                                "Well, I've wrestled with reality for thirty-five
                                years, Doctor, and I'm happy to state I finally
                                won out over it." -- Elwood P. Dowd

                                "I'll say I'm losing my grip, and it feels terrific."
                                -- Smiling husband to scowling wife, New Yorker cartoon

                                Comment

                                Working...