Re: Symbol clashes: how to avoid them. Part 2
- From: Lars Rune Nøstdal <larsnostdal@xxxxxxxxx>
- Date: Fri, 31 Oct 2008 23:02:27 +0100
On Fri, 2008-10-31 at 11:37 -0700, budden wrote:
- every independent expert would say very definitely that a.b.c is
much easier to read that (c-of (b-of a)).
I use (c-of (b-of a)), but it's more common to use or say (c (b a)).
Adding:
(defmethod c-of ((a a))
(c-of (b-of a)))
...or something, in cases where one very often need to reach `a' via `b'
is possible btw.
I don't think a.b.c is easier to read at all ... and it's not easier to
deal with either, which is what matters most in the long run anyway.
Don't even say about (slot-value (slot-value a 'b) 'c).
I don't see how this relates, and I'm sure you know, but:
(let ((slot-name 'x))
(slot-value object slot-name))
I was unable to explain why eight closing parens go in a row...
Hum .. a set of parens denote the start and end of a list -- add nesting
to this.
They don't "go" anywhere in _particular_ "by themselves" which is kind
of the point.
Additionally I was disappointed when you told me about parenscript. MP
with code generation from a lisp is an area of my strategic interests
and if the author of parenscript is disappointed with it, it is a
shock for me.
Uh, it was something I heard on IRC; it might not be true or accurate.
Of course, one reason can be easily seen from the same
a.b.c problem: javascript is just much shorter and easier to read.
I don't think so .. fiddling with syntax in JavaScript has been quite
annoying and time-consuming, and not only because of
browser-differences.
...might just be me; I prefer Lisp and Lisp-syntax. Doesn't this conflict
with what you said above btw.?
Finally, I began to think that lisp is NOT a language for a web
development. It might work well as an MP tool or as a server platform,
but some more convinient syntax should be exposed to application
developer.
It would be ideally if it could combine adequate syntax
with elegance of AST management and other successful design choices
unique to lisp. Something like Nemerle or even shell. I think such a
language is not too hard to develop using lisp as a platform, and I
have already started some prototype.
I think you have conflicting ideas.
What goes to symbolicweb, I think you might want to add some
"symbolicweb-dsl" package, which would reexports most popular symbols
from :sw, :tbnl, :cl-who, etc... And tell a users to use that
symbolicweb-dsl. In fact, when you are combining new system from
several smaller ones, you definitely need to specify how it is
composed for potential users.
Yeah, this might work. I think it should be optional though; say SW uses
cl-who internally, but the user wants to use something else than cl-who
to generate HTML.
.
- References:
- Re: Symbol clashes: how to avoid them. Part 2
- From: Lars Rune Nøstdal
- Re: Symbol clashes: how to avoid them. Part 2
- From: budden
- Re: Symbol clashes: how to avoid them. Part 2
- Prev by Date: Re: How to programmatically exit?
- Next by Date: (setf slot-value-using-class) not working ...
- Previous by thread: Re: Symbol clashes: how to avoid them. Part 2
- Next by thread: Re: Symbol clashes: how to avoid them. Part 2
- Index(es):