privat/nit — pull request #787 by privat (2014-09-29 20:33:17+00:00)
Title: new annotation for manual setter `autoinit`

Sometime, automatic setters are not suitable and manual ones should be used.
Nit, especially since annotations (#601 and #604), has a simple way to the have attributes and manual setters.

~~~
class A
var foo: String is private writable(private_set_foo)
fun foo=(v: String) do ...
end
~~~

However, with new constructor, it is the `private_set_foo` method that is used as initialiser during the instantiation.

~~~
var a = new A("toto") # is in fact:
# a = alloc-instance(A)
# a.private_set_foo("toto")
# a.init
~~~

One may want to manually promote some setters as an initialiser, it it the job of the `autoinit` annotation.

~~~
class B
var foo: String is private writable(private_set_foo), noinit
fun foo=(v: String) is autoinit do ...
end

var b = new B("toto") # is in fact:
# B = alloc-instance(B)
# b.foo=("toto")
# b.init
~~~

Bonus: in fact, this works for any method, even when thez have more than one parameter. See the modification or the clock example that now use new constructors with a manually-set autoinitializer.