Re:Lisphp is a Lisp dialect written in PHP.
by mahmud on Monday July 05, 2010 @01:30PM
(#1488671)
You're still in the pedagogy sandbox; every real Lisp worth using has structures and objects:
[ Parent
| on HN ]
> You're still in the pedagogy sandbox;
Don't worry, I realize that :)
> very real Lisp worth using has structures and objects:
That's a tricky and somewhat circular definition.
If it is worth using it is probably real and vv, but most lisp tutorials that teach 'pure' lisp do not have structures and / or objects, they rely on lists alone as their major data structure.
That also defines all lisps that do not have these items as somehow not real and there seem to be a lot of lisp people that somehow consider this 'impure'. Or is my reading material that dated ?
If your reading material Lisp doesn't have some form of defstruct then it certainly is dated, or they are avoiding it on purpose. Every non-toy Lisp has it.
Ok, thanks. That helps. I started 'from the ground up', I figured that the best way to study a language is by looking at the way it was in the beginning since that's the most pure form of it. If 'lists' are as great as they are said to be you'd expect that things like structs and classes are optimizations, not essentials.
Don't do that for Lisp. You will be stuck with the dynamic scoping that Lisp used to be plagued with in the beginning.
Go far a modern Lisp like Scheme. (You can ignore the syntax you don't want to deal with, yet.)
Yeah, you can view it as an optimization: you can build defstruct & co on top of lists with macros. However, using ca(d)*r by hand is not advisable in any case...
Usually it goes the other way around: you implement lists on top of defstruct.
Restricting yourself to Pure Lisp is like insisting on only dating virgins.
I have a very snappy comeback to that one but I highly doubt it will pass the censor ;)