From: Förster vom Silberwald
Subject: Re: Ray tracer in Stalin
Date: 
Message-ID: <1124524770.226922.238810@g49g2000cwa.googlegroups.com>
Marco Antoniotti wrote:

> But the following looks very much like Common Lisp
>
>
> (use-package "UNIFY")
>
> (defun map2 (fun list-1 list-2)
>     (match-case (list list-1 list-2)
>        ((() ()) ())
>        (((?h1 . ?t1) (?h2 . ?t2))
>         (cons (funcall fun h1 h2) (map2 fun t1 t2)))
>        ((_ _) (error "Invalid list arguments to map2: ~S ~S." list-1
> list-2)))

That is very interesting. Thanks for the pointer. Didn't know that
Common Lisp has some inherent potential.

Would be interesting to hear whether Bigloo pinched from Common Lisp
(or the package thereof) or whether the "UNIFY"-package and Bigloo its
pattern-matching implementations derive from the same source in the
literature.

I must honestly say, that I do not feel the urge very often for using
pattern-matching in Scheme. However, I find the Bigloo
patttern-matching facilty cool (okay I must honestly say: for the very
first time I find Common Lisp also cool).

Beauty is in the eye of the beholder.

Schneewittchen
PS: Sorry I didn't know that it will also appear on comp.lang.lisp (I
writing from com.lang.scheme, though).
From: Marco Antoniotti
Subject: Re: Ray tracer in Stalin
Date: 
Message-ID: <bjqOe.58$DJ5.70318@typhoon.nyu.edu>
F�rster vom Silberwald wrote:
> Marco Antoniotti wrote:
> 
> 
>>But the following looks very much like Common Lisp
>>
>>
>>(use-package "UNIFY")
>>
>>(defun map2 (fun list-1 list-2)
>>    (match-case (list list-1 list-2)
>>       ((() ()) ())
>>       (((?h1 . ?t1) (?h2 . ?t2))
>>        (cons (funcall fun h1 h2) (map2 fun t1 t2)))
>>       ((_ _) (error "Invalid list arguments to map2: ~S ~S." list-1
>>list-2)))
> 
> 
> That is very interesting. Thanks for the pointer. Didn't know that
> Common Lisp has some inherent potential.

Now you don't have any more excuses.  Switch to CL immediately! :)


> Would be interesting to hear whether Bigloo pinched from Common Lisp
> (or the package thereof) or whether the "UNIFY"-package and Bigloo its
> pattern-matching implementations derive from the same source in the
> literature.

I am sure that Bigloo went along and implemented its own (unportable) 
version of pattern-matching (note: not unification) before I did my 
implementation. I am not a user of Bigloo, so I did not pattern my 
implementation on it.  Besides, I needed to be very much integrated in 
CL. Of course, the CL-UNIFICATION is completely portable across all 
self-respecting CL implementations.


> I must honestly say, that I do not feel the urge very often for using
> pattern-matching in Scheme. However, I find the Bigloo
> patttern-matching facilty cool (okay I must honestly say: for the very
> first time I find Common Lisp also cool).

You 'aven't seen anyhting yet!  :)

Cheers
--
Marco