Prev: Comparing Lisp to Python, what you consider more important:speed or macros.
Next: Comparing Lisp to Python, what you consider more important: speed or macros.
From: grucidipo on 29 Apr 2010 14:53 On 29 abr, 10:25, Tim X <t...(a)nospam.dev.null> wrote: > grucidipo <gruzci...(a)yahoo.es> writes: > > I find easier to program in Python than in Lisp, but Lisp has Macros > > and it can optimise for speed. > > > Here are some subjective numbers: > > > Easy to program & Standard Library & Speed & Macros > > or similar > > > Python: 0,8 0,8 0,5 0.4 > > Lisp : 0,5 0,5 0,8 0,8 > > > I would like to know what weight other Lisper give to theses > > factors. I know that it depend of what type of application you are > > developing, but I am curious what other think about this. > > Its a false question, like asking what do you think is more important > feet or hands. Personally, I want both. > > -- > tcross (at) rapttech dot com dot au Hello Tim, it can be a false question, we know that in the complex field C there is no total order, and that arrow theorem says that there is no a perfect scheme for voting and so on. I was expecting some subjective reflections about the importance of macros and speed of Lisp as useful advantages with respect to Python. I agree that there is no objective way of assigning numbers to those factor, nor are they ortogonal wrt each other. But I think that what Lisper think about this factors can be useful. Thanks for being a polite man, that's a real value nowadays.
From: grucidipo on 29 Apr 2010 15:01 On 28 abr, 23:04, fortunatus <daniel.elia...(a)excite.com> wrote: > On Apr 28, 4:08 pm, grucidipo <gruzci...(a)yahoo.es> wrote: > > > .... The most difficult part is to develop an algorithm to solve a > > problem, i don't think there is any difficulty writing the code. > > There must be some difficulty, else you wouldn' be able to > differentiate "easy to program" between the two languages as you > have. Surely you must have some opinion about your relative skill > level with each language. > > Some of my thoughts: > . Python and Lisp both gain giant "easy to program" marks for dynamic > data typing, ie, values have type but variables don't need to (unless > optimizing for speed, for instance). > . Common Lisp has compiler hints to optimize speed. (And space. > Wizard of space and time.) > . Macros can let some library functions, like compatability layers, > add essentially no speed penalty over in-line code. > . Some general GUI code I've seen in Python suffers hugely from lack > of macros - blocks of 8-20 lines cut & paste copied, with minor > modifications many times. This makes it easy to introduce mistakes, > which should lower the evaluation of "easy to program" due to hours > spent debugging. Macros accordingly, for me, raise Lisp's "easy to > program" by reducing mistakes. > . Macros also let you make new control flow constructs where bodies of > code are an argumehttp://start.ubuntu.com/9.10/nt, and the macro can change the body of code before > dropping it into place, like scanning through and replacing keywords > with new bits of code. Again, if you have some experience under your > belt with regard to macros, and you tend to revisit very similar > problems, Lisp should get another huge "easy to program" boost for all > the times after the first couple, when you are using your great macro. > . You'll never come to the end of why Lispers like macros... Hello Fortunatus (Daniel?), I think you have made a good point about macros, you went straight ahead to the OP and make a sound argumentation about macros, so well done. Thank you for being polite, that is a real value nowadays (TM).
From: grucidipo on 29 Apr 2010 15:05 On 28 abr, 21:27, grucidipo <gruzci...(a)yahoo.es> wrote: > I find easier to program in Python than in Lisp, but Lisp has Macros > and it can optimise for speed. > > Here are some subjective numbers: > > Easy to program & Standard Library & Speed & Macros > or similar > > Python: 0,8 0,8 0,5 0.4 > Lisp : 0,5 0,5 0,8 0,8 > > I would like to know what weight other Lisper give to theses > factors. I know that it depend of what type of application you are > developing, but I am curious what other think about this. Well, this is my last post in this group, thank to those that answered in a polite and correct manner. I really think that is an important element that shape our personality and life. Lisp be with you forever :)
From: Scott L. Burson on 1 May 2010 01:18 On Apr 29, 6:42 am, J Kenneth King <ja...(a)agentultra.com> wrote: > grucidipo <gruzci...(a)yahoo.es> writes: > > I agree, macros are a big win, but the problem I see is that they are > > not easy to standardise, you can construct a new language with macros > > and for others reading your code can be difficult. > > I cannot abide the "construct a new language" argument. > > Macros are a part of Lisp. They don't modify the language of Lisp. > They don't create new languages inside of Lisp. Oh, I beg to differ. (And I'm very surprised no one else has challenged this.) How many conversations have we had here about using macros to create domain-specific languages? I did that myself just a few months ago -- used macros to create a specialized variant of CL for use in my pet AI project -- it has firstclass continuations and some other stuff. It is also absolutely the case that people can go crazy with macros just as they can go crazy with, say, operator overloading. I've definitely heard, over the years, of instances where this has occurred. While well-designed macros can very much improve readability of code (as others here have pointed out), poorly-designed ones can make a real mess. Power can always be misused. The question is whether we refuse it, or learn to use it well. -- Scott
From: Duane Rettig on 2 May 2010 16:47
On Apr 30, 10:18 pm, "Scott L. Burson" <g...(a)zeta-soft.com> wrote: > On Apr 29, 6:42 am, J Kenneth King <ja...(a)agentultra.com> wrote: > > > grucidipo <gruzci...(a)yahoo.es> writes: > > > I agree, macros are a big win, but the problem I see is that they are > > > not easy to standardise, you can construct a new language with macros > > > and for others reading your code can be difficult. > > > I cannot abide the "construct a new language" argument. > > > Macros are a part of Lisp. They don't modify the language of Lisp. > > They don't create new languages inside of Lisp. > > Oh, I beg to differ. (And I'm very surprised no one else has > challenged this.) It just gets tiring making that challenge for the Nth time. Also, he is obviously not talking about CL macros. He can't abide the new- language argument because he has obviously never abode in a new language constructed with CL. Duane |