Open fergusq opened 9 years ago
The parser works correctly with variables that share names with functions, so maybe this is intended?
Dim Print = 5
Print Print
Print(Print)
Prints 5
twice. I see no reason to remove this feature unless some ambiguity is found (I'd imagine that variables holding functions might cause something like x = Print
in this scenario to be ambigious?)
I know that it works, I mean that that feature itself is unnecessary and confuses young programmers. Especially if function values are implemented as in issue #19.
This is currently undocumented feature. We still have to decide how to implement functions as types. One idea would be that functions are constant variables but this scheme doesn't support overloading out of the box. All ideas are welcomed.
Henrik
It is possible to create a variable variable that is named with the exactly same name as an already existing function.
This feature should be disabled, as young, innocent children do not undestand that there is a difference between functions and variables.