3 ms·
Isn't he basically just saying "quote" ? In this hypothetical graphical interface, what is the color around letrec bindings ? I'm presuming green again, which i
by mindslight 15y ago
Isn't he basically just saying "quote" ? In this hypothetical graphical interface, what is the color around letrec bindings ? I'm presuming green again, which is an appropriate way of differentiating "here be dragons", but it doesn't really indicate what the semantics are. That green box could just as well be a Clojure vector. I think having separate colors to indicate specific well-known semantics would indeed be less Lispy (but this might not necessarily be a bad thing).
It occurs to me that most of what made/makes Lisp so powerful historically (expression-based and everything-is-an-object, for example) is probably quite different from what differentiates it today (which probably has more to do with the assumptions that Lisps don't force on you)
- stevelosh 15y agoI think his example is a bit tough to understand and it might be easier to use another one. Consider the Julia language. Julia is homoiconic -- Julia code is made of Julia data structures: http://julialang.org/manual/metaprogramming/ http://julialang.org/manual/metaprogramming/ Imagine for a second that Julia didn't have the :() quote form, and if you wanted to build up some syntax you had to use constructors, something like this: a + b - c Expr(type="call", function=Symbol("+"), args=[Expr(type="symbol", name="a"), Expr(type="call", function=Expr(type="symbol", name="-"), args=[Expr(type="symbol", name="b"), Expr(type="symbol", name="c")])]) (obviously not valid Julia, but that doesn't matter for now) This would still make Julia homoiconic, but the different between "using" the expression (the first line) and "mentioning" it (the horrible Expr thing) is much greater. Clojure does have more syntax than Common Lisp, but its syntax is still "near at hand" because it's still made up of the things you use every day. Functions use [] for arguments, but that's just a vector which you use anyway. There's not really much syntax in Clojure where "mentioning" it is harder than "using" it.
- mindslight 15y agoBut the only real difference between "using and mentioning" seems to be the presence of (quasi)quote. I haven't looked at Julia, but I'm presuming you can do :(a + b - c), which mentions the syntax. But as you point out, the manipulation is still annoying because the syntax tree is strongly typed. In fact, the typing strength of the syntax tree seems roughly equivalent to the amount of "syntax dedicated to semantics" a language has, which is the point that the author starts off trying to refute.