Dan Knapp writes:
> On Fri, 11 Apr 2003, Thomas F. Burdick wrote:
> > One thing I really appreciate from the ANSI CL spec is the concept of
> > string designators, and the accompanying function, STRING. In my own
> > code, I make heavy use of the concept of FOO-designators, and
> > accompanying FOO functions. It seems like there are a few places in a
> > [...]
> Designators are definitely handy, I use them as well. However I
> tend to use them on the receiving end
Yeah, that's what I was trying to communicate, although maybe badly.
> I haven't really noticed any problem with this approach, but it's
> not applicable in every situation. I'm curious which way you prefer
It's not always applicable, but this seemed like a time when it was.
I tend to do use the more Python-friendly construct of:
(defun visit-cps-graph (fn cps-function)
(let ((cps-function (cps-function cps-function)))
but it's the same idea. When identifying things early for which it
might be useful to have a thing-designator concept, I've found that it
sometimes saves me trouble later. In the above example, from a
Proof-Carrying Code system I'm working on, it turned out that
sometimes you want to visit the graph when you're working somewhere in
the middle of a cps-function, and it's possible, but not easy, to get
to the outside of it. Added a method to the CPS-FUNCTION gf, and the
code stayed simple to read.
,' .\ / | No to Imperialist war |
,--' _,' | Wage class war! |
/ / `-----------------------'
( -. |
| ) |