idea: defining class attributes via constructor?
Posted: Fri Mar 06, 2009 3:05 pm
what if :
would render:
you could also use
with multiple constructor overloads:
class Foo
def init(foo as String, bar as DateTime)
.foo = foo, .bar = bar
would render:
class Foo
var foo as String
var bar as DateTime
def init(foo as String, bar as DateTime)
.foo = foo, .bar = bar
you could also use
- Code: Select all
.foo is private = anotherParameterName
with multiple constructor overloads:
- it will grab up every found member
- the compiler should fail if non nil members (for references) are not properly initialized over all available constructors