Alan,

Thanks for the suggestion. The NetLogo developers discussed this idea and 
we agree that it is often difficult to name variables in NetLogo. At the 
moment, we think modifying "set" in this way would make it harder to use 
since it would give "set" related functions distinguished primarily by 
syntax. We also thought modifying "set" in this way would make it more 
difficult to create a clear error message for users if it caused any errors.

One thing that could help make this easier is a new feature we'll introduce 
in the next major version of NetLogo. We're introducing a new primitive 
datatype "code blocks" for use by extensions. A code block is a list of 
tokens which are passed to the primitive at runtime but constructed using 
square brackets, like NetLogo literal lists. Using code blocks it would be 
possible to write an extension primitive which behaved somewhat similarly 
to what you're suggesting here.

Thanks,
Robert

On Tuesday, March 1, 2016 at 3:33:47 PM UTC-6, Alan Isaac wrote:
>
> One thing I really miss from other high-level languages is multiple 
> assignment.
> It seems like allowing
>    set [var01 var02] mylist
> (when the two list are equal length) would not create any syntactical 
> ambiguity.
> Is there any interest in this?
>
> Thanks,
> Alan Isaac
>

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to