Saturday, March 21, 2015

Evolution of Lisp (barely into Chapter 1)

So, the week was busy, and I'm finally getting back to SICP. I feel there's a certain type of energy required to maximize appreciation for this book, and it's a type that I probably won't be in all the time, so... This may be slow-going.

Anyway, there's a quote in the book that I found interesting (I'm snipping out some bits, and adding emphasis):

"Lisp's informal evolution has continued through the years.... This evolution, together with the flexibility and elegance of the initial conception, has enabled Lisp... to continually adapt to encompass the most modern ideas about program design."

I see this as something that must continue. Luckily, I also see it as something that is continuing, if perhaps at a slower pace in some ways than one might hope for.

I was having a discussion the other day that's pertinent to this, as well. We were talking about different lisps, and different other languages, and what they each have to offer. An observation was made that one nice thing about Clojure is that it has added some ways to express certain other data types (vectors, maps, sets) as literals. Indeed, I see this as a potential (and potentially huge) win. And of course, it's possible in any lisp that supports reader macros[0] to add this to said lisp. But still, it's valuable, I think, to have the form of it be a de-facto standard, whether or not it's a Standard.

And I'm starting to think that the "standard" aspect of Common Lisp may be a hindrance to its progress. To its evolution. I could easily be wrong about this, in various ways. I do think, though, that a strict adherence to the standards presently available in whatever language does risk nipping in the bud what could otherwise become some beautiful flowers of joyous new forms[1].

One thing I dislike about Clojure, and I admit this may be an unfair bias, is that it runs in the jvm. Which is really more about the j than the vm: I kind of hate all things Java. There are some good reasons for this (a complete lack of metaprogramming capabilities[2] is certainly a problem with blub[3] — I mean Java), and likely some bad ones, too (like that I've decided I hate it and therefore often I'm unwilling to even look at it to see what useful things might be there – like, perhaps, the jvm??). Still, that's where I'm at at the moment, and while I'm open to the idea that my viewpoint might change, I'm currently thinking: What if someone wrote a Clojure core-language implementation (I know we'd lose any libraries that are front-ends to Java libraries, though I hear that many Clojure libraries are, in fact, pure Clujure, so I don't know how much we'd actually lose?) that compiled down to, say, llvm code, to then run on a variety of platforms as native code. I think if that existed today, there's a good chance I'd drop all reason for caring about Common Lisp. (Then again, does Clojure have conditions and restarts? It would seem not; nor reader macros! Pity.) As it is, I still may well get around to exploring Clojure more at some point. Or maybe I'll just read up on some of its literals, and see what I can do about implementing them as reader macros in CL (that is, Common Lisp)?

Of course, for the purposes of SICP, I'll just stick with Scheme for now, since that's what the book uses. Which brings me to a question: Is Scheme still actively evolving? I think it might be (for example, I think s7 might be relatively new, as these things go), but I don't really know.  And anyway, there is, again, a standard.  Or 6.  Or 7 or 9 or something.  Hmm, I guess that's a sign that it's continuing to evolve?  Well, good.

Final note: I'm now up to page 17.  Nothing quite inspired me to write yet another post since that tidbit on page 3, though there is some interesting stuff.  More to come on chapter 1, I'm sure.




Footnotes:

[0]  is that any lisp? I don't know! Must find out.  I know it certainly applies to Common Lisp, as discussed later.

[1]  Forms, get it? It's a lisp joke. Groan at will.

[2] To link to but one of Steve Yegge's posts that have influenced me away from Java – and towards Lisp(s).

[3] Another influence of mine is Paul Graham (sigh, all the white guys[4]), and "blub" refers to a paradox he presents in an essay called beating the averages, also described in brief on wikipedia.

[4] If anyone knows any non-white and/or non-male people writing about Lisp, please point me at them!  I'll probably go on a hunt at some point, too.  Because, you know, diversity is good.  And I'd love to think I could apply the diversity challenge to my programming books.  Can I??

No comments:

Post a Comment