[Grace-core] more comments on collections

Andrew P. Black black at cs.pdx.edu
Thu Jul 17 15:11:46 PDT 2014


That's a reasonable convention, Marco, but clearly can't apply everywhere.
 The *copy* method, for example, will (usually) create a new object.  But I
don't know of a commonly-accepted conventional symbol for *copy*.


On Thu, Jul 17, 2014 at 2:55 PM, Marco Servetto <marco.servetto at gmail.com>
wrote:

> On 18 July 2014 09:40, Kim Bruce <kim at cs.pomona.edu> wrote:
> > nfusing that both have essentially the same type (and otherwise look very
> > similar).  This requires very good comments (and the user to read them!)
> to
> > understand when the operation is a mutates the current data structure and
> > when it results in a new one.  I'm not sure what the right answer is
> (don't
> > worry about chaining operations?), but it seems like it would be
> confusing,
> > espe
>
>
> To make clear when an operation create a new list and when it modify
> the current one, you could use the following easy to remember
> convention:
> - symbolic operators create new lists
> - alphanumeric methods modify the current one
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20140717/c16d9aff/attachment.html>


More information about the Grace-core mailing list