I agree.

On 02/06/2015 01:55 PM, Bryan Head wrote:
I think that's a great idea for an extension.

On Fri Feb 06 2015 at 1:53:52 PM Marshall <[email protected] <mailto:[email protected]>> wrote:

    On Friday, February 6, 2015 at 12:39:59 PM UTC-6, Jason Bertsche
    wrote:

        Does it complicate the NetLogo language, though, if agentset
        primitives knew how to deal with "agentbags".  Maybe there's
        something I'm not seeing.

        Bags and sets are two things that you can use very similarly,
        but they can lead to very different behavior in a model.  If
        someone is writing code that deals with bags and sets, there
        will be cognitive overhead to keeping track of which variables
        hold which of the structures (i.e. agentsets or agentbags),
        and knowing the difference between the two structures, and
        knowing when to use which structure.  Not saying that it's the
        end of the world, but I think added cognitive overhead is
        something that's important to take into
        consideration—especially in a language like NetLogo that aims
        to have a low barrier to entry.

        Regarding debugging, if you're in a situation where you think
        you have an agentset but truly have an agentbag (or vice
        versa), figuring out why your model is misbehaving might not
        be so easy.  In fact, you might never realize at all!  I think
        the reason that this isn't currently a problem in NetLogo is
        because all of the NetLogo collections—all two of them, plus
        those provided by extensions—use a very noticeably different
        set of primitives.  There's some overlap in the vocabularies
        of lists and agentsets, but not a whole lot.


    Yeah, I see what you're saying.  Those are really good points.

    So I suppose that NetLogo is trying to satisfy two poles of a
    continuum: the entry level people, and experienced modelers.  And
    one of the beautiful things about it is that it does both well for
    a broad range of kinds of models, thus allowing for an easy
    learning path from one end to the other.  For its target modeling
    domains, nothing does better at this tradeoff.  Maybe the "high"
end is pushing on NetLogo to develop more flexibility, recently. (I'm not really at the high end--more like the middle.) If
    NetLogo became difficult to learn, then someone would have to
    invent a new modeling tool that was easier.

    Putting aside all questions about ease of implementation,
    complexity of code, etc., hypothetically, maybe a good strategy
    would be to introduce agentbags only through an extension, with
    replacements for agentset commands, such as bag:ask, which don't
    work with agentsets  That way no one will use bags except when
    they really want them, and the bag: prefix will make the
    difference obvious.  If you want to apply these commands to an
    agentset, you would have to convert it to a bag with a command
    like bag:turtle-bag. It would be nice if turtle-set would convert
    turtlebags
    to turtlesets.  And if there were an equality predicate that could
    tell you that an agentset and an agentbag had exactly the same
    members.  Not saying this is easy....

--
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] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
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