Hi Paul,
On 21.08.2017 04:30, Paul King wrote:
Introduce a "var" (o.s.) keyword that allows deduction of type
through assignment:
var device = new PrinterDevice(...) // device variable will have
type PrinterDevice without the need to explictely state that
Rationale: This is a well known feature of other languages, that
reduces the need to explictely define the type of variables.
How is this different to the current type inferencing?
The variable/field will have the type of the initally assigned value
(instead of Object when using def), therefore one cannot accidentially
assign any other type to it.
Cheers,
Markus