Arc Forumnew | comments | leaders | submitlogin
4 points by almkglor 6116 days ago | link | parent

1) Hmm. Currently I've been experimenting around with Arc's type system. The type system is "not bad" but there's a definite problem: making a user-defined type quack like a built-in type is very difficult. My "Create your own collection" series is probably of interest in this research.

If however you are using only user types (not masquerading existing types), then nex3's defm macro is your friend: http://arclanguage.com/item?id=4644

2) LOL. However, if you need just the "then" branch, or just the "else" branch, you can use the 'when and 'unless macros:

  (from "arc.arc")
  [mac] (when test . body)
   When `test' is true, do `body'.
      See also [[unless]] [[if]] [[awhen]] 
  nil
  arc> (help unless)
  (from "arc.arc")
  [mac] (unless test . body)
   When `test' is not true, do `body'.
      See also [[when]] [[if]] [[no]] 
  nil
4) Definite problem. In fact, pg's own code doesn't seem very modularized: bits and pieces of the various parts of the webserver are in srv.arc, html.arc, and app.arc. Fortunately Arkani's 'help command also includes which file the function is defined in, so at least you can track files a little (although in practice I often find myself looking for definitions using grep).

5) Arkani has a "CONVENTIONS" file for some conventions. However it's incomplete IMO, so probably we need to fill this in somewhat.

7) True, true. Sure, Arc code is fun to write, until it encounters a problem. Then it's hard to debug/optimize/whatever