Re: [Factor-talk] Remove [let, [let*, [wlet and leave : to simplify locals?

2009-10-25 Thread Joe Groff

On Oct 25, 2009, at 12:53 AM, Jon Harper wrote:

 : et [let are different because : can't be used everywhere.

That's a good point, Jon. Here's another idea: We could reduce [let ]  
to merely introduce a nested lexical scope, removing the | ... | part  
and leaving it up to : to make bindings within the [let ] block.  
[let ] would still work within a : definition as well. So your  
example could look like this:

: toto ( a b -- c ) [let 6 * : b' b' + ] ;

-Joe

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] Remove [let, [let*, [wlet and leave : to simplify locals?

2009-10-24 Thread Joe Groff
There's a bit of redundancy in locals. You can bind a variable  
using :, [let, or [let*, and the two latter forms just get  
transformed into the former behind the scenes. The [let forms also  
seem unnecessarily bulky compared to : . What would you all say to  
phasing out the [let forms and just leaving : ?

Also, nobody appears to use [wlet . Would anyone object to that being  
removed?

-Joe

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Remove [let, [let*, [wlet and leave : to simplify locals?

2009-10-24 Thread Jon Harper
: et [let are different because : can't be used everywhere.
From the docs:
Notes
This word ( : ) can only be used inside a lambda word, lambda
quotation or let binding form.

: toto ( a b -- c ) [let | b' [ 6 * ] | b' + ] ; ! works
: toto ( a b -- c ) 6 * : b' b' + ; ! does not work

I like the [let form better than :, but that's just my opinion, and
I'm very new to factor.


On Sun, Oct 25, 2009 at 11:20 AM, Joe Groff arc...@gmail.com wrote:
 There's a bit of redundancy in locals. You can bind a variable
 using :, [let, or [let*, and the two latter forms just get
 transformed into the former behind the scenes. The [let forms also
 seem unnecessarily bulky compared to : . What would you all say to
 phasing out the [let forms and just leaving : ?

 Also, nobody appears to use [wlet . Would anyone object to that being
 removed?

 -Joe

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Factor-talk mailing list
 Factor-talk@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/factor-talk




-- 
Jon Harper

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk