[Grace-core] Names for the […] literal

James Noble kjx at ecs.vuw.ac.nz
Wed Feb 3 18:30:25 PST 2016


> On 4/02/2016, at 12:13pm, Andrew P Black <black at cs.pdx.edu> wrote:
> 
> On 3 Feb 2016, at 00:00 , James Noble <kjx at ecs.vuw.ac.nz> wrote:
> 
>> I meant to ask explicitly,  should the “[ ]”’s interface be minimal (just iteration and say size) or maximal (a collection).
> 
> You did ask this explicitly.  I think that you have asked three times now ;-)

sorry: I knew I asked you & Kim: I meant that I didn’t ask Michael & Tim explicitly. 

> For all the reasons that you quote, it should be minimal.  Didn't we agree on that?   I though that all that was at issue is the name.

I think we’re 90% there, I was just checking in with Tim & Michael…



> When we chose sequence, list, and set a couple of years ago, we did this in the conscious knowledge that we didn't have a name for immutable sets.  One alternative that we considered then, which we could reconsider now, is to use iList and mList for the two kinds of list, and iSet and mSet for the two kinds of set.   If we think that we might want to make this change, this is a good time to do it, because existing code that uses, say, list.with(1, 2, 3, 5, 7) will need to be edited anyway.   On the whole, I think that I'm happy with sequence and list, but it sounds as though you may not be.

comments?
yes “now” is the time to do this for suitable definitions of now.
Again, I think Tim was in favour. I’d have thought this was something we could get comments on,
especially if we put in names beginning with “i” and “m” 
(we’d also need names for interfaces though)

> I'm for the name "run", but if you don't like that, then I would choose "lineup”.

one reason for a horrid name of this (“VariadicList” for now? :-)  
is that we might get feedback to choose a better one


>  I find "series"  acceptable too, but likely to cause more confusion.  For example, one might say in class "this method takes a series of arguments" and have students think that it takes a variable number of arguments, rather than one argument that is a collection.  This is less likely to happen with a term like "lineup" that is less likely to be mistaken for everyday speech.
> 
> In addition, because we do not want students to use these [ things ] for everyday programming, we should not choose a name that students may well associate with an everyday programming construct.  So an "oddball" name like boundedIterable or conseqution or lineup is actually preferable to something like list or sequence. 
> 
> With regard to your suggestion, I would rather not repurpose “list” to be immutable, since the languages to which people are likely to move from Grace — Java, C++ & Python — use “list” for mutable structures.  The standard data structures course will probably teach “linked lists”, which are mutable.





More information about the Grace-core mailing list