Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!cs.utexas.edu!rice!titan!dorai From: dorai@titan.rice.edu (Dorai Sitaram) Newsgroups: comp.lang.scheme Subject: Re: Request for Comments: A new n-ary function construction Message-ID: <3181@brazos.Rice.edu> Date: 22 Nov 89 23:36:31 GMT References: <891122-121343-4098@Xerox> Sender: root@rice.edu Reply-To: dorai@titan.rice.edu (Dorai Sitaram) Organization: Rice University, Houston Lines: 34 In article <891122-121343-4098@Xerox> Pavel.pa@XEROX.COM writes: >I would like to avoid using ``rest lists'' in my Scheme code, especially at >the lowest levels, for a number of reasons: they are usually difficult to >optimize and I don't like the language-level preference for the list type >over, for example, vectors. To get around the problem, I thought of >extending the syntax of lambda-lists to the following: > > ::= \kill? > | ( * ) > | ( + . ) \kill? > | ( * "arbitrary" ) > | ( * "arbitrary" . ) \kill? >[...] I _love_ this idea! Probably the only merit of the existing "rest list" situation is that it made me work real[ly] hard to try to rewrite my code so that I avoided using them, sometimes getting in the process better-looking and better code incidentally. But, of course, there are always some places where one needs must use "varargs," and though Ch*z Scheme's case-lambda [1] construct goes some way toward avoiding the nasty list-fixation, your solution is more general with probably little or no (?) loss in efficiency. Luckily, both strategies can be combined to good use (restricting case-lambda arglists to non-rest-lists of course). What's RRRS have to say to this? --dorai [1] Dybvig & Hieb, A Variable-Arity Procedural Interface, 1988 ACM Conf. on Lisp and Functional Programming. -- ------------------------------------------------------------------------------- It may be that the gulfs will wash us down; It may be we shall touch the Happy Isles. -------------------------------------------------------------------------------