From: Csaba Henk Date: 2005-03-26T07:44:49+09:00 Subject: Re: Getting the word to conventional programmers On 2005-03-25, Glenn Parker wrote: > Csaba Henk wrote: >> >> There was one interesting bit, committed by Pall, the PHP guy: >> >> DevSource: If there were one core thing you could change about scripting >> languages, what would it be? >> >> Pall: Even though popular scripting languages such as Python, Perl, Tcl, >> PHP, Javascript are all very high-level languages, they are all based on >> an text based idiom. [...] Representing code as abstract syntax trees >> and not streams of characters is central to huge advances in programmer >> efficiency and simplicity. > > I chuckled when I read that. The secret to "huge advances" is, wait for > it... LISP! Only we'll have to drop that antiquated textual > representation stuff for something (?) better. Too much PHP must rot an > important area of the brain, the same way candy affects your teeth. :) :) Recently I got quite fond of Io, http://www.iolanguage.com. Io supports all the lispy stuff and even more (no difference between object and binding; function, closure, method, lambda, macro-like parsetree tweakers are all the same; and not *almost* everything is message sending to an object, like in Ruby or Smalltalk, but *everything*, perdiod). And it has a much more friendly syntax than than of Lisp. Slightly more verbose than Ruby, but still an agile language. Ruby: [dog, cat, cow].each { |a| a.squeak } [dog, cat, cow].each_with_index { |a,i| a.say "I'm the #{i}-th animal" } Io: list(dog,cat,cow) foreach(i,a,a squeak) list(dog,cat,cow) foreach(i,a, a say("I'm the " .. (i asString) .. "-th animal") ) Note that in "foreach(i,a,a squeak)" there is no syntactic difference between the index/value pair which are to be used as immediate values and the "block argument", to say it in ruby lingo, which is to be run in each iteration. This phenomenon becomes much more interesting when you discover you can as well write methods like this. So the point is that you can get "lisp powa" in a modern scripting language as well without burying yourself under tons of parens and whew-how-the-heck-should-I-name-this-one like function names. Csaba