Merge: Prepare for new constructors
With new constructors, attributes without default value are considered even if a constructor is present.
So, while ugly, the following code is currently working.
~~~
class A
var attr: Attr
init do attr = new Attr(foo)
end
var a = new A
~~~
With the new constructors, the attribute `attr` will be part of the signature of the new,
~~~
var a = new A # Error, expected one argument `attr: Attr`
~~~
So this series do some cosmetic changes to accommodate the future new constructors.
Most of these change make senes own their own since they:
* reduce the number of lines by removing useless init
* clarify the behavior of some attributes by adding a default value or a `noinit` annotation
More precisely, easy cases of the previous code is usually migrated into
~~~
class A
var attr = new Attr(foo)
end
var a = new A
~~~
And complex cases into
~~~
class A
var attr: Attr is noinit
init do attr = new Attr(foo)
end
var a = new A
~~~
The few remaining very complex cases (ex parser) will be migrated latter, and a temporally new annotation `old_style_init` may be created for them.
Pull-Request: #674
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>