Re: Property syntax
Posted: Sat Jun 08, 2013 4:25 am
Not sure those are good examples of implicit insertion since they are built into the framework rather than the language and (wrt inheritance and initializers) there is still an indication of 'something extra' happening (inherits and cue init).
As earlier, I dont mind so long as there still exists the capability of putting 'from var' in if desired.
Take the balance example above - doesnt need or use a backing variable
If I understand the proposal correctly will still get one inserted though not needed or used
result as if had written:
with the explicit 'from var', its existence serves as an indicator that cobra is directed to use/create backing variable.
As earlier, I dont mind so long as there still exists the capability of putting 'from var' in if desired.
Take the balance example above - doesnt need or use a backing variable
get balance as number
bal = 0.0
for order in orders, bal += order.bal
return bal
If I understand the proposal correctly will still get one inserted though not needed or used
result as if had written:
# implicit backing variable inserted (though unneeded)
var _balance as Number
get balance as number
bal = 0.0
for order in orders, bal += order.bal
return bal
with the explicit 'from var', its existence serves as an indicator that cobra is directed to use/create backing variable.