On Tue, 30 Apr 2013 07:28:11 +0800, Alan Manuel Gloria <almkg...@gmail.com> 
wrote:

> You could use a dynamically-scoped variable (don't remember what they're
> called in CL) to pass back the "reason for stopping" return value, and
> return the read-in datum from the read implementation.  Dynamically-scoped
> variables are even run-time-stack lifetimes, so they're highly appropriate
> for simulating return values.

Thanks for the reply! That's true, but then I'd have to pack/unpack the info,
and there's a fair amount of setup/unsetup to work around read's interface.

After a certain point, the effort to avoid the work is harder than doing the 
work :-).

What's silly is that (obviously) the underlying Common Lisp *HAS* a mechanism
for implementing backquotes and the various ,-operators. The problem is that 
there's
no standard way to directly *invoke* them without also invoking read.
But on re-examination, I found that re-implementation was easier than I thought.

So I ended up re-implementing just those functions, basically by copying 
Steele's code.
It's public domain, but I'm delighted to give him credit.

The result: the Common Lisp sweet-expression implementation now properly handles
backquoting and the comma operators (comma-at, comma-dot, and just plain comma).

Hooray!

--- David A. Wheeler

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to