[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Naive T Design Questions



       3. Why was VALUES renamed to RETURN?  RETURN seems to imply change of the
	  control flow which return does not do!
   Invoking a continuation is a return.  RETURN invokes a continuation.

So do + and CAR. Why don't we rename them RETURN-+ and RETURN-CAR? My point is
that invoking continuations is no special distinction -- all primops do it.
JJH has a real point -- there is a lot of momentum behind regarding RETURN as
something that throws out of the current defun, basically because almost
everyone knows either C or CommonLisp. T is flying in the face of at least two
major standards by binding this name to this alternate semantics. Now,
departing from old standards is a fine thing to do, if there is a good reason
for it, but I can't see one in this case. VALUES doesn't have the connotation
of throwing out of nested control structure. It does emphasize that
multiple-values are being passed. And *that* is exactly what VALUES is -- it
is just the MV identity primop. It invokes its continuation in a way that is
just like any other primop, modulo the MV property. So the interesting thing
about this function is *not* that a continuation is invoked, but that multiple
values are passed.

VALUES is a better name. 

       4. (This is not a design question.)  Is there a place where T code may 
          be deposited for the purpose of making it generally available? ...
          In general, I think code sharing amoung T users
	  should be encouraged as much as possible so that we are not all
	  running around recoding simple tools in T.
This is an excellent idea. In particular, the tutils software from Yale
doesn't come with the distribution. But it is good stuff to provide the
user community, particularly since Scheme looping primitives are so...
primitive. Could we store such a library of stuff on prep? CMU, alas,
does not allow anonymous ftp. Very paranoid facilities folks around here.

   Actually, in T you can use ordinary symbols instead of keywords, since
   you don't have to worry about the vagaries of multiple packages:
      (foo 'bar 3)
But you *do* have to worry about multiple packages if you are doing a
"real" CommonLisp implementation/translator. Which is useful, not because
programming in CL is fun, but because there are a lot of CL programs out
there that would be useful tools for Scheme programmers.
		-Olin

   (define (fact n) (if (return-= n 0) 1 (return-* n (fact (return- n 1)))))