PROPOSAL: Auto-assignment Parameters

Mark Mahieu markmahieu at googlemail.com
Thu Mar 26 14:21:37 PDT 2009


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

> I see one problem here.
> class Some{
>   final String name;
>   public Some(String this.name){}
> }
>
> perform .intern() is impossible now.


Correct, you'd have to write it the same way as you'd do now.  I actually
view that as a Good Thing though: there's a clear, visual distinction
between parameters which are just assigned directly to the fields, and those
on which we perform some operation first.  Only the latter would appear in
the body of the constructor, without being cluttered by the former.


> But I like the proposition 'much'.
> Simple and clear.


Glad you like it!


Regards,

Mark



More information about the coin-dev mailing list