Proposal: Indexing access syntax for Lists and Maps (original) (raw)
Mark Thornton mthornton at optrak.co.uk
Tue Mar 31 00:47:04 PDT 2009
- Previous message: Proposal: Indexing access syntax for Lists and Maps
- Next message: Proposal: Indexing access syntax for Lists and Maps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Stephen Colebourne wrote:
I'm surprised annotation solutions are being considered given the general approach taken to annotations affecting the language.
For this feature, if it went ahead, I would strongly request having four new interfaces IndexedGet IndexedSet MappedGet MappedPut Each with one method. There are two disadvantages to this approach:
- The type of the index is restricted, presumably to int. This would prevent this mechanism being used to provide huge 'arrays' with long indexes. If regular arrays are subsequently extended to support long indexes this would then be a mismatch.
- Can't readily be extended to higher dimensions should that later be considered desireable.
Mark Thornton
- Previous message: Proposal: Indexing access syntax for Lists and Maps
- Next message: Proposal: Indexing access syntax for Lists and Maps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]