[Factor-talk] newbie question: clone

2011-05-06 Thread Zhe Hu
what's the difference between: V{ } clone 3 suffix! V{ } 3 suffix! I guess my question is why do we need clone, since it takes one object, but puts back just one object. Thanks, -- WhatsUp Gold - Download Free Network

Re: [Factor-talk] newbie question: clone

2011-05-06 Thread William Schlieper
On Fri, 2011-05-06 at 10:12 -0500, Zhe Hu wrote: what's the difference between: V{ } clone 3 suffix! V{ } 3 suffix! I guess my question is why do we need clone, since it takes one object, but puts back just one object. Because V{ }, when written in a function definition, refers

Re: [Factor-talk] newbie question: clone

2011-05-06 Thread Chris Double
On Sat, May 7, 2011 at 3:12 AM, Zhe Hu iammegat...@gmail.com wrote: what's the difference between: V{ } clone 3 suffix! V{ } 3 suffix! I guess my question is why do we need clone, since it takes one object, but puts back just one object. V{ } creates a literal vector and pushes it on the

Re: [Factor-talk] newbie question: clone

2011-05-06 Thread Andrey Onymov
V{ (as well as T{ { H{ and others) is a parsing word - it creates a new object in _parsing_ stage and compiles in _a reference_ to that object. Without clone each invocation of a word using V{ }/T{ }/... would refer to same vector/tuple/hash/... - making it something like function's static