Arc Forumnew | comments | leaders | submit | okplus's commentslogin

What if _ was a list in the event that the function was passed more than one argument? With the . syntax, you could use _.1, _.2 for an arbitrary number of arguments, and wouldn't have to introduce __ to access the list of arguments.

-----

1 point by absz 6102 days ago | link

Hmmm, I like that. The only problem is that then you can't just say _ to access the first argument, and one-argument functions are the most common case. So you'd either need a new name for _ or a different name for the list, it seems to me, and those break symmetry.

-----

1 point by okplus 6102 days ago | link

Easy, when one argument is passed, assign _ to the first argument of the arg list. It wouldn't change anything about current [] expressions.

-----


The UI language features a great deal more separation of code and design than the arc web framework. I know libraries aren't a high priority at the moment, but this guys UI is pretty expressive. To be honest, I wasn't expecting much from the demo app, but it had a very rich presentation layer, and his actual code was very simple.

-----

2 points by almkglor 6104 days ago | link

Agree. Anyone willing to port this to Arc? He ended up not using CLOS anyway, right?

-----

2 points by ryantmulligan 6104 days ago | link

My impression was that it gets its hints from CLOS but uses its own description framework on top of that. Though I haven't used it.

-----

2 points by okplus 6105 days ago | link | parent | on: Binary Search Trees in Arc

To me, this code is illustrating that "." and "!" should have their meanings reversed. "b!l" and "b!r" in arc would map to "b.l" or "b.r" in python, while "b.side" in arc, is something more akin to "b.getattr(side)"

Ofcourse, swapping the meanings of ! and . puts a cramp in syntax like "b.0"...

-----

3 points by okplus 6111 days ago | link | parent | on: First Priority: Core Language

ActionScript does have an eval function: http://www.adobe.com/support/flash/action_scripts/actionscri...

Edit: looks like it may be somewhat limited. Just names of variables. It doesn't actually eval beyond looking in the symbol table...

-----

2 points by nostrademons 6111 days ago | link

Yeah, it was a deliberate design decision by Macromedia. They wanted to keep the VM small, so they deliberately left out anything that smacked of a runtime compiler. Eval, regexps. Though I heard regexps may have come back in AS3...

-----