Arc Forumnew | comments | leaders | submitlogin
1 point by shader 3416 days ago | link | parent

Well, scheme supports multiple values, so it shouldn't be too hard to get them into arc, right?

1 point by conanite 3416 days ago | link

arc supports multiple values via destructuring

  (let (a b c) (fn-returning-list-of-3-things)
In the particular case of returning multiple indexes into a string though, you don't usually know in advance how many matches there will be, so destructuring isn't an option.


1 point by Adlai 3416 days ago | link

Multiple return values from a form are allocated on the stack, not on the heap. I don't 100% understand what that means, though...

One practical consequence is that you don't have to deal with later multiple values if you don't want to, but when values are returned as a list, you have to deal with them.