Re: Symbol clashes: how to avoid them. Part 2



On 2008-10-31, Tamas K Papp <tkpapp@xxxxxxxxx> wrote:
On Fri, 31 Oct 2008 11:37:19 -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)). Don't even say about (slot- value

Great! How should I write

(defun analyze-statistic (statistics &option (type 'total))
(let* ((statistic (slot-value statistics type)
(a (calculate-a statistic))
(b (calculate-b statistic)))
;; ...
))

(analyze-statistic *statistics*)
(analyze-statistic *statistics* 'unemployed)
(analyze-statistic *statistics* 'employed)

in the wonderful notation your "independent experts" have cooked up?

Why:

String slot_access = "statistics." + type.toString();

System.library.greenspun.functions_that_begin_with_e.eval(slot_access);

:)
.