Arc Forumnew | comments | leaders | submitlogin
2 points by conanite 5157 days ago | link | parent

Quick note on destructuring behaviour: arc3 doesn't verify parameter counts in destructuring arg lists.

You can see this in the wild in 'parseurl in srv.arc:

  (let (type url) (tokens s) ...)
(tokens s) returns a 3-element list (it's tokenising "GET /foo HTTP/1.1").

Here are two examples destructuring a 3-element list into a 2-element arg, and into a 4-element arg:

  arc> (let (x y) '(a b c) y)
  b ; no error
  arc> (let (x y z nothing) '(a b c) nothing)
  nil ; no error