[Grace-core] minor language issues

Andrew P Black andrew.p.black at gmail.com
Mon May 25 12:10:08 PDT 2015


James,

The thing that you refer to as “built in sequence” is not part of the Grace language.  You may be confused because minigrace still accepts it; 
that’s because the minigrace compiler still uses it, and when I took it out, the compiler slowed down unacceptably.  
Removing it altogether is still on my list, but not a really high priority.

If we make various kinds of brackets user-definable methods, then we could have uniform syntax and use [ ] for sequences.   But that would mean using more brackets, which you don’t like doing … although there are lots of them.

	Andrew

On 24 May 2015, at 19:34, James Noble <kjx at ecs.vuw.ac.nz> wrote:

> varargs vs collection-passing:
> 
>> You'd need a strong motivation to get rid of them.
> 
> well I always have dreams about getting rid of stuff (so I can put in MORE OTHER STUFF)
> 
>> Hitherto there has been opposition to collection literals, so that approach was
>> impractical, and it's less pleasant to work with anyway.
> 
> If there weren’t objections to collection literals, what do you see are the other disadvantages vs varargs? 
> 
> Andrew wrote: 
> 
>> Variable arity methods also make the syntax seen by the requester more uniform.  The requestor writes set.with(4, 5, 6), list.with(4, 5, 6) and sequence.with(4, 5, 6) rather than set.with[4, 5, 6], list.with[4, 5, 6] and [4, 5, 6].  
> 
> sure, although really I guess nonuniformity is 
> 
> [4, 5, 6]         // built in sequence
> list.with [4, 5, 6]   // list 
> set.with  [4, 5,  6]   // set…  
> 
> or with factory methods / non-dotted classes: 
> 
> [4, 5, 6]         // built in sequence
> list [4, 5, 6]   // list 
> set [4, 5,  6]   // set…  
> 
> or with one sort of magic:
> 
> collect [4, 5, 6]
> collect [([4, 5, 6 ])] 
> collect [{[ 4, 5, 6 ]}] 
> 
> or another sort of magic
> 
> [4, 5, 6]
> [([ 4, 5, 6 ])] 
> [{[ 4, 5, 6 ]}] 
> 
> which do we prefer? 
> 
> J 
> 
> 
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150525/e07b3958/attachment.html>


More information about the Grace-core mailing list