Arc Forumnew | comments | leaders | submitlogin
3 points by drcode 5942 days ago | link | parent

The issue is that the variable is at the scope of the "do", which means it can't be a standard macro, but a change to the language implementation. It can definitely be done though- The question is more as to whether this offers enough conceptual advantage over "let"...

This is essentially the same (or very similar at least) to a system I implemented a while back, which you can read about here: http://arclanguage.org/item?id=7485

I added an additional twist that gives it additional advantages that I argue offset the cost of a new language construct.



1 point by bOR_ 5941 days ago | link

what is exactly the advantage it has over 'let'? Just brevity? (I'm not sure if having explicit local variables adds clarity)

-----

2 points by drcode 5941 days ago | link

it's the combo of brevity, one less set of parens and one less indentation level.

-----

1 point by stefano 5941 days ago | link

It would let you avoid adding an indentation level.

-----