PROPOSAL: Auto-assignment Parameters

Mark Mahieu markmahieu at googlemail.com
Thu Mar 26 17:07:40 PDT 2009


2009/3/26 Marek Kozieł <develop4lasu at gmail.com>

>
> class Some{
>
>     private String name;
>
>     public this setName (String this.name){};
>
>     public this.name getName(){};
>
> }
>

Leaving to one side the idea of returning 'this' from setName, yes
auto-assignment parameters could easily be made to work on all non-abstract
instance methods.

As you suggest, this could be extended even further to return values, but
one of the questions that raises is whether it's acceptable to omit the
type, as you've done in your example (imagine what it would look like in a
much bigger class with many more methods).

Mark



More information about the coin-dev mailing list