Elena <egarrulo@gmail.com> wrote:
+---------------
| Kenneth Tilton <kentil...@gmail.com> wrote:
| > As for if* vs. loop: iteration is big enough to justify a DSL, a fork in
| > the road is not.
|
| I don't understand what you are saying. Does anyone care to explain?
+---------------
"DSL" == "Domain-Specific Language", so Kenny is just saying that CL's
LOOP provides a sufficiently rich set of semantics to choose from that
a specialized sub-language for LOOP is not unreasonable. [Another example
might be the DSL encoded into the format strings of the FORMAT function.
*Definitely* "non-Lispy", but so incredibly useful that a DSL is justified.]
And Kenny is also saying that the simple two-way branch provided by CL's
built-in IF -- a simple two-way "fork in the road" -- *doesn't meet the
test of "a sufficiently rich set of semantics" to justify the DSL that
Franz's (or John Foderaro's, whichever) IF* macro provides. [IF* basically
allows the use of THEN & ELSE keywords instead of using CL's PROGN to
group multiple expressions in an IF branch.]
+---------------
| > Where /is/ Erik when we need him?!
|
| Erik Naggum, right? Oh, Erik, I miss him too. Very sharp guy, indeed.
| Luckily there are backups of old threads starring him. Do you remember
| the unemployed programmer-and-Perl dilemma? Let me refresh your
| memories:
|
| http://www.schnada.de/grapt/eriknaggum-perlrant.html
+---------------
Yes, indeedy! Line noise! I can't read Perl that *I* wrote a week later! ;-}
Actually, my big "Aha!" moment for Perl was when I read Sriram
Srinivasan's "Advanced Perl Programming", and found out that Perl's
"typeglobs" are really a lot like CL symbols, except with more slots,
and using readmacros as accessors:
Perl form CL (near-)equivalent form
========= =========================
*foo 'foo ; the typeglob for "foo"
$foo (symbol-value 'foo) ; scalar value
&foo (symbol-function 'foo) ; function value
%foo (symbol-plist 'foo) ; associative array (:test #'eq)
@foo (symbol-array 'foo) ; array value [no direct CL equiv.]
FOO (symbol-stream 'foo) ; filehandle [no direct CL equiv.]
[O.k., (SYMBOL-PLIST 'FOO) is really only a rough analogy to %foo;
SYMBOL-HASH might be a better name. But the former can do the job,
perhaps just not as efficiently. (Also, GET uses EQ as the test, and
Perl's "%" uses something closer to EQUAL.) And let's not even mention
"aliasing" from assigning typeglobs!! (E.g., do "local *b; *b = *a;",
and now $b ==> a's scalar value and &b ==> a's function value!)]
Once I figured all that out, reading Perl code got a *lot* easier... ;-}
+---------------
| Jokes apart, some time ago I've read on his site that he was
| experiencing some illness. I hope he's better now.
+---------------
His web site [last updated a year and a half ago] suggests
probably not, unfortunately:
http://naggum.no/
... @2006-257
...
I am unable to keep my company in operation for health reasons...
Until my health improves, which it might never do sufficiently,
I am generally unable to accept programming projects, teaching
opportunities, or requests to advise students, although I would
really like to see what I can do if you would like my input.
...
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607