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

Re: What?



In article <joswig-CDF2A4.13101611082002@news.fu-berlin.de>,
 Rainer Joswig <joswig@lispmachine.de> wrote:

> Hehe, I hear the Gwydion Dylan people are adding more Lisp stuff
> to Dylan.

What are you thinking of here?  I'm certainly interested in seeing if 
there's anything that CL obviously does better than Dylan, but to date 
I'm not aware of any changes that have been made to the Dylan language.

Oh, wait ... I did add a "foo = bar" clause to the for loop as a 
shorthand for "foo = bar then baz" where bar and baz are the same 
expression.  So the summing example can be written as:

 define method sum-stream (stream)
   let sum = 0;
   for (n = read-line(stream, on-end-of-stream: #f),
          while: n)
     sum := sum + string-to-integer(n);
   end;
   sum
 end;

I was certainly aware of the corresponding CL usage:

(defmethod sum-stream ((stream stream))
  (setq sum 0)
  (loop for line = (read-line stream nil nil)
        while line do (incf sum (parse-integer line)))
  sum)

So I guess you could that's adding CL stuff to Dylan.  On the other hand 
I don't have any intention to add collect or sum or count to Gwydion 
Dylan's for loop.

-- Bruce