#215 Return values of default \\\"makeArray\\\" implementations

v3.2.0
closed
Rick McGuire
Classes (154)
5
2012-08-14
2007-08-06
No

Since revision 637 'Collection's method 'makeArray' returns 'allItems'
instead of 'allIndexes' by default.

Because of that the 'makeArray' method in 'OrderedCollection' is
not needed anymore and could be removed.
[If it should remain then I would suggest to optimize the code now that
'allItems' has to be implemented to "return self~allItems" (removing the
"~supplier" section from the current implementation.]

However, it is not explicitly defined that 'MapCollection's 'makeArray'
would return 'allIndexes', hence I would suggest to add a default
implementation of 'makeArray' to the 'MapCollection' class:

    ::method 'makeArray'    /* return index array */
      return self~allIndexes

[An alternative would be to let 'Collection's default implementaiton of
the 'makeArray' method return 'allIndexes' and leave everything else
alone.]

(I could take over this item.)

Discussion

  • Rick McGuire
    Rick McGuire
    2007-08-07

    Logged In: YES
    user_id=1125291
    Originator: NO

    Committed revision 657. Code update
    Committed revision 658. Doc update

     


Anonymous


Cancel   Add attachments