[Grace-core] The arity problem

Marco Servetto marco.servetto at gmail.com
Wed Oct 28 07:22:06 PDT 2015


no matter how I try, I can not see that pdf on my machine(s)

On 26 October 2015 at 02:11, James Noble <kjx at ecs.vuw.ac.nz> wrote:
>
>> On 24/10/2015, at 11:46am, Andrew P Black <black at cs.pdx.edu> wrote:
>>
>> I just came across this paper (or mine!) which nicely describes why we need overloading by arity.
>
> indeed!
>
>> The relevant sections are "The Partial Order of Types" on page 11-18 and "Form Partial order to Lattice", which follows.
>
> So that makes the case that *types* need overloading on arity, to make type checking more elegant.
> it doesn’t necessarily follow that all types must (potentially) be inhabited.
> In Grace we have the option of making different choices for classes and for types
> (even though usually I’d argue against that in general…).
> But that would give you a theoretically clean type lattice,
> without the practical / understandability / philosophical
> issues of actual overriding.
>
> I feel slightly dirty for suggesting it but I am on a 12 hour flight…
>
>
> In the paper you write:
>
>> The solution, like many good ideas, is quite simple and in hindsight quite obvious: we needed to treat operations with different arities as if they had different names.
>
> so we *already have* ways for operations with different arities to have different names:
> one can always write multi-part methods and then this “problem” doesn’t exist.
> There is a question about what we want to do about it - perhaps more generally about
> method calls - varargs, arity, generalised messages,
> (everyone should go to Michael’s talk at the DLS, if that doesn’t leave NOOL empty :-)
> I wonder if there are again simplicifications (perhaps on the object side
> rather than in the types) that can rule out the more complex cases?
> Once again: orthogonality vs simplicity vs pragmatism.
>
> anyway: something to talk about this week!
>
> and: I’m interested in Emeralds rules for manifest declarations & immutable objects.
>
> James
>
>
>
>
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core



More information about the Grace-core mailing list