Arc Forumnew | comments | leaders | submitlogin
3 points by Pauan 4830 days ago | link | parent

Interesting timing... A few days ago I started work on a language of my very own, designed from the ground up. Here's Arc's `alref` implemented in my language:

  $def! ref: type list? any?
    [[X Y] | R] X -> Y
    [~     | R] Y -> ref R Y
Alternatively, if you want to build it on top of `assoc`:

  $def! assoc: type list? any?
    [X | R] Y -> $if: is (car X) Y
                   X
                   assoc R Y

  $def! ref: type list? any?
    X K -> let R: assoc X K
             if R: car: cdr R
I'm still working on the parser and evaluator... once it gets into a semi-decent state I plan to post it on GitHub along with more information, including a tutorial.


1 point by Pauan 4830 days ago | link

Oh yes, and I should mention that I hadn't seen that link until just now, so I wasn't stealing their ideas about pattern matching or syntax. Instead, my language has taken ideas from Kernel, Shen, a tiny bit of Arc, and a little splash of my own ideas thrown in for good measure.

-----