clone is used to make a new vector. V{ } creates a vector at
parsetime, and when the code is run, a reference to that vector is
pushed onto the stack. If this vector is manipulated, it will
manipulate the original copy. Sometimes this is what you want to do,
but if you want a *new* empty vector, you have to clone it. Another
way to accomplish this is 0 <vector> . There's no particular reason to
use one or the other.

Dan

On Wed, Apr 8, 2009 at 10:14 AM, Ludovic Kuty <mail...@kuty.be> wrote:
> Hi,
>
> I read an article and saw various samples in the factor code base
> where the need for an empty vector materializes as: V{ } clone. I am
> wondering why is the clone word used.
>
> TIA,
>
> Ludovic Kuty
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to