3 ms·
Sorry? The ability to add looping constructs and other control structures, like with* or defstruct/defmethod etc. to CL isn't fundamental for CL as a language?
by dschiptsov 12y ago
Sorry? The ability to add looping constructs and other control structures, like with* or defstruct/defmethod etc. to CL isn't fundamental for CL as a language? What is fundamental, then?
And, please, don't tell me about the Lisp 1.5 - it was "fundamental" but has been evolved since then.
btw, if you really do look inside arc.arc you will see "a bunch of nested macros".) This approach, championed by pg (or rather rtm) and described in the classic On Lisp book is, in some sense, the culmination of the few selected ideas behind a Lisp - you evolve the language as your understanding of the project deepens (evolves) by hacking appropriate DSL as you go. It is not just a "book stuff" - Arc is very real thing and this very site has been built very quickly (and cheap) using this very approach with very few lines of clean, readable code.
Ironically, we are using these pages to discuss "religious nonsense" such OO-is-the-only-way, Java-is-the-proper-everything, Scrum-is-the-way-to-manage-big-projects, or "sectarian stuff" like Javascript.)
- lispm 12y agoWell, one can get quite far without writing macros. SICP for example writes (almost) no macros. Norvig himself has written only a few macros for his book PAIP.
- dschiptsov 12y agoYeah, having high-order functions gives you the ability to write "a primitive" DSL, which is the one of the big ideas from SICP. The limitation is that all the arguments to your high-order function will be evaluated before its application, so if you need a special form (with its own evaluation rule) you have to write a "short-circuiting" macro transformation. This is how to write "advanced" DSLs. Almost a 2/3 of Arc are macros, but, yes, there are very few "special forms" among them. As for PAIP, he loves structs and looping DSLs, while, at least for me, the beauty is hidden in explicit recursive calls for traversing a recursive data-structures (lists, trees, graphs) made out of conses. I'm Brian Harvey's man.)
- coldtea 12y ago>Sorry? The ability to add looping constructs and other control structures, like with or defstruct/defmethod etc. to CL isn't fundamental for CL as a language? What is fundamental, then?* Who said anything about CL in specific? The article is about "how to write a Lisp in Python". Second, no "reader macros" are not "fundamental", even for CL. Well, except if you mean the built-in ones, like #. But surely, adding custom reader macros is neither necessary nor fundamental for CL (nor are non-lispy DSLs). And they sure aren't for a simple Lisp (as in TFA). From TFA: "the beauty of the language is that we only need six special forms" P.S Anybody who downvotes = disagress, does he also have any counter-argument?
- dschiptsov 12y ago"the beauty of the language is that we only need six special forms" - this is an oversimplification.) There are not mere "only six special forms" involved in what makes a Lisp "a miracle". There is, in my opinion, a small, well-balanced set of ideas/principles which are complementing each other. Notably "everything is a symbol (pointer)" semantics, common for code and data cons-based underlying representation, so "the code is data" maxim makes sense, the uniform general evaluation rule for prefix-notation expressions, the "list-aware" reader function, to name the few. All these ideas or principles aren't CL specific, on the contrary, these are common for all Lisps. CL is just a good example of incorporating mini/specialized DSLs (loops, format, etc). I have tried to describe "how the miracle works" but failed miserably.) These are my counter-arguments. http://karma-engineering.com/lab/blog/Good-ideas http://karma-engineering.com/lab/blog/Good-ideas http://karma-engineering.com/lab/wiki/ProperUnderstanding http://karma-engineering.com/lab/wiki/ProperUnderstanding http://karma-engineering.com/lab/wiki/Bootstrapping1 http://karma-engineering.com/lab/wiki/Bootstrapping1 http://karma-engineering.com/lab/wiki/Bootstrapping2 http://karma-engineering.com/lab/wiki/Bootstrapping2
- Pacabel 12y agoThe "downvote if you disagree" has gotten to a rather stupid point here lately. In nearly every submission I read the comments of these days, I see numerous perfectly fine and valuable comments in gray text. Since so much good content ends up in that state, it renders such styling pointless. Gray text no longer means that the content is very likely commercial spam or otherwise without much value. I even go out of my way to read all of those comments. With so much good content being downvoted these days, they often have some of the more insightful remarks.