Can anybody post a Standard Scheme Macro that does what SETQ of Common
I find it unbelievable that the Scheme designers provide only a set!
with a useless return value. This language must have been designed by
academics who scorn the need of programmers.
The set! of course does not adhere to any rigid logic. If you argue
that assigning values and returning something must be separated, why
then not argue that scoping and assigning (as done by 'let') must be
separated? I like the following programming style, possible in Lisp:
(let (line match str)
(or (eofp (setq line (read-line)))
(and (setq match (find-match)) (setq str (match:substring match 1)) ) ) )
where scoping and assigning are kept separate and setq is a function
that is inserted in the flow in order memorise some intermediate
values that would otherwise be lost. I don't think of assigning as
of a separate procedure. And this kind of thinking doesn't save any
computing time either. Isn't scheme called a FUNCTIONAL LANGUAGE?
Why this fallback behind C ?
Also, forcing scoping and assigning into one linear list seems
primitive to me. There are many more possible relations between
different assignements than just a progn sequence.
Some aspects of this language seem badly flawed.
Unfortunately I have not yet found any tutorial on Scheme macro
programming that allowed me to overcome these flaws. The R5RS
specification is too abstract.
I would be very grateful for some help at this moment, since I have
already written a pile of SCSH scripts on which some applications have
come to depend, and they are all ugly due to the absence of
(1) a set (setq) that returns the value it sets to
(2) a let that doesn't assign but initiates to #f
One of my applications is a dictionary lookup system which you can
consult by sending mail to email@example.com. The mail consists of
one line of the form
ANFRAGE = anti-aliasing, bastard, tool, cool, benign, Benin, fuzzy
where 'ANFRAGE = ' is constant and the rest are items you want to look
up. This system has access to a lot of dictionaries.