From: Robert Klemme Date: 2005-03-27T20:29:46+09:00 Subject: Re: [OT] on Lisp (was: Re: Getting the word to conventional programmers) "Christian Neukirchen" schrieb im Newsbeitrag news:m2wtrute3t.fsf@lilith.local... > "Robert Klemme" writes: > >>> Also, the method names were totally readable. (From MAPC, you >>> can at least guess that it maps a sequence. MAPC has the advantage of >>> not collecting the results. If you dont like the name of MAPC, you >>> are free to rename it as you like. Don't expect anyone to understand >>> that. :-)) >> >> Well, yes, but it's not only method names. It's the way you have to >> group things together plus the multitude of methods / ways to do >> certain things. > > TIMTOWTDI. Sorry, just couldn't resist. But the same is true for > Ruby too; Definitely! > for example, create a Hash from two Arrays that contain the > keys/values. I wonder how *you* would implement that. As soon as it > gets a bit more complex, Ruby provides lots of ways to solve things. > It's just that the very to often needed cases already have very > convenient solutions. That's what makes everyone think Ruby is so > easy and covenient. (And unfortunately, the part were Common Lisp > doesn't shine. Yeah, maybe that's what makes the difference. The convenience mechanisms encapsulate complexity which is good if you start. You can then later delve into more detail. But if you just have a set of basic building blocks that you can combine in any way (Lego comes to mind...) it might be hard to find a good starting point. > I'm still looking for an really simple way to do > string.split...) > >> And probably it's also the power of macros that make Lisp code >> difficult to comprehend for starters: a function call and a macro >> call look totally alike on the syntactical level yet they are so >> totally different (the most significant difference being the point >> in time when something is evaluated if my Lisp knowledge doesn't >> betray me). > > Exactly. But, of course, this is what makes Lisp so powerful. .... as I said. :-)) >> And then you have these different ways of quoting >> inside a macro... > > I'm not sure what you mean here, probably quasiquotation. Yes, that was what I meant. (Of course I din't know the correct Lisp term...) > CL's `(foo bar ,baz quux) is to lists what Ruby's "foo bar #{baz} quux" > is to strings. I don't think that is very hard to grasp, But it's easy to overlook as it's smaller (compare "`" with "#{}"). > but it's > true it's not that easy to write *good* macros. There are lots of > hidden traps. I can only recommend to everyone to read Paul Graham's > On Lisp on that topic. For advanced Lispers, though. I'll try http://www.gigamonkeys.com/book/macros-standard-control-constructs.html and http://www.gigamonkeys.com/book/macros-defining-your-own.html >> I readily believe that Lisp is extraordinary productive - and I admire >> Lisp solutions once in a while. But I've never been exposed to it >> long enough to really embrace it. Maybe I've done too much procedural >> and object oriented development - or it's just that my brain is more >> suited to OO thinking, dunno... :-) > > You know that CL is the world's first OO language to achieve ANSI > standardization? :-) I didn't know that, thanks! > Still, there are worlds between CLOS and > Smalltalk-style message sending... I know that. > > Also, often you don't even need to actively use Lisp to profit from > its ideas and techniques, knowing about them and their advantages and > disadvantages can make your life as programmer lots easier. (And more > painful if you need to use "lesser" languages...) :-) >> If someone out there knows a >> Common-Lisp-in-30-days-guaranteed-comprehension tutorial, let me >> know and I'll might give Lisp another try. > > I can only recommend everyone interested in Lisp to read Peter > Siebel's excellent book "Practical Common Lisp": > > http://www.gigamonkeys.com/book/ > >> Thanks for listening and sorry for the noise >> robert > > You're welcome. Thanks for the pointer! Kind regards robert