Re: [q-lang-users] [cowan: Chicken Scheme to Q interface almost ready for beta]
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-08-31 08:08:27
|
John Cowan wrote: > I'm really, really close to releasing the beta version of my egg for > Chicken Scheme, which provides Chicken programmers with convenient access > to the Q interpreter. Hey, that's great! I'm currently downloading Chicken s.t. it's ready to go when you release your Q egg... > Nevertheless, this *is* surprising, and means that to represent "1+2+3" > as an S-expression one must write nested q:call lists. Yes, but that's to be expected. In difference to Lisp, Q's (+) is *not* variadic. If this is really too much hassle, you could maybe add something like a q:foldl/q:foldr macro which does the necessary expansion or translates to a q:call of Q's foldl1/foldr1. > I thought of > treating applications where the second element is an operator specially, I'd say that's a bad idea, because it's inconsistent (at least from Q's POV) and gives the Chicken programmer a very wrong idea about how these operators behave in Q. Also, you'd have to handle user-defined operators, too. Therefore I'd favour the idea of having a separate macro to handle these cases. Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |