rfc:code_free_constructor
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:code_free_constructor [2019/01/23 13:41] – rjhdby | rfc:code_free_constructor [2019/01/28 07:18] – rjhdby | ||
---|---|---|---|
Line 55: | Line 55: | ||
class MyCustomMotorCycle($cc, | class MyCustomMotorCycle($cc, | ||
</ | </ | ||
+ | |||
+ | {{: | ||
By the way, current realization simply add "_ _construct" | By the way, current realization simply add "_ _construct" | ||
Line 62: | Line 64: | ||
class MyCustomMotorCycle(int $cc, int $whells = 3, ...$otherParams) extends MotorCycle(" | class MyCustomMotorCycle(int $cc, int $whells = 3, ...$otherParams) extends MotorCycle(" | ||
</ | </ | ||
+ | |||
+ | ===== Restrictions ===== | ||
+ | This syntax can't be used with anonymous classes because those classes instantiated at once they declared and same syntax is used for forwarding parameters directly into constructor. | ||
===== Possible Issue ===== | ===== Possible Issue ===== | ||
Line 108: | Line 113: | ||
Draft implementation, | Draft implementation, | ||
- | https:// | + | https:// |
===== References ===== | ===== References ===== | ||
rfc/code_free_constructor.txt · Last modified: 2019/01/29 12:17 by rjhdby