[Grace-core] Equality of method names

James Noble kjx at ecs.vuw.ac.nz
Mon Jan 11 22:14:11 PST 2016


> On 18/12/2015, at 5:36am, Personal <squireblack at gmail.com> wrote:
> 
> Following up, somewhat belatedly, on the discussion that started while we were commenting on Tim's smallstep Operational semantics, I wanted to offer some further thoughts on when two method names are the same or different.

and even more belatedly replying. 

> So the question now arrises whether, say, assert(1)shouldBe(1) and assert(2)shouldBe(1) are the same or different.  Pragmatically, "the same" means that requests of one can cause an execution of a method declared using the other.

yes that’s right. 

> In our discussions, though, I thought that I heard a third position, 

probably would have been me, but I can’t remember it.

I strongly prefer a style where we write multi-part method names rather than multi-argument parts -
multi-part, single-argument per part method names don’t have this problem with overloading.
I don’t like mixing the two styles - I’d be happy with a stylistic guideline saying do one other other but not both.

and I really like our original goal of “no overloading” and don’t want to lose that 
(although was another of our original goals “no multiple inheritance” :-)

the question then is: to what extent should we prefer symmetry / orthogonality over the added complexity
of what a method request is — e.g. by supporting multiple parts with multiple arguments each? 

I’m aware in other areas - inheritance - I’ve argued for symmetry and underlying simplicity of common semantics.

it would be nice to make progress on this one way or another; I’d prefer not to put in changes not motivated by real use-cases
J 


More information about the Grace-core mailing list