Arc Forumnew | comments | leaders | submitlogin
Wart core just about done (github.com)
4 points by akkartik 5083 days ago | 3 comments


3 points by akkartik 5083 days ago | link

So far I've avoided arc-style optional args. Following javascript, all args are optional. But if you want to give them a default, the only way so far is explicit:

  def func(req opt)
    or= opt default
    ...

-----

1 point by akkartik 5083 days ago | link

It makes me very happy to see assignment progressively refined for core types (http://github.com/akkartik/wart/blob/f7406bfa93/010.cc#L22), then user-defined types and setcar/cdr (http://github.com/akkartik/wart/blob/f7406bfa93/023type.wart...), then multiple var/val pairs (http://github.com/akkartik/wart/blob/f7406bfa93/027mutate.wa...).

Compare doing this atop common lisp (http://github.com/akkartik/wart/blob/460565a2e0/014set.lisp#...). Set it to this name, then rename it to that name, ugh. On the flip side, the new version doesn't support parallel assignment yet.

The final remaining feature is def :case (http://arclanguage.org/item?id=13790). Then I'll start putting the webserver together. (Let me know if you see any arc features I missed.)

-----

1 point by akkartik 5083 days ago | link

Update: def and mac are now extensible: http://github.com/akkartik/wart/blob/d39be9de84/028generic.w...

As an example, here's len overloaded for queues: http://github.com/akkartik/wart/blob/d39be9de84/032queue.war...

-----