
3 Oct
2008
3 Oct
'08
11:09 a.m.
On Fri, Oct 3, 2008 at 2:25 AM, Peter Dimov <pdimov@pdimov.com> wrote:
Incidentally, you might consider supporting a scopeless let (if it doesn't already work):
lambda(_x, _y)[ let( _z = _x + _y ), _z * _z ]
analogous to a C++ local variable:
auto _z = _x + _y; return _z * _z;
Nice.
and maybe even dispense with the let at all:
lambda(_x, _y)[ _z = _x + _y, _z * _z ]
although this has the usual drawback with being ambiguous with an assignment to an outer-scope _z:
lambda( _x, _y, _z = 0 )[ _z = _x + _y, _z * _z ]
No please, I hate this in python. Let 'let' be (no pun intended). BTW, Joel, if Phoenix can do this easily, major kudos! -- gpd