Unify method and field symbol spaces on objects #574
Labels
enhancement
Enhancement to language design
implementation/inprogress
Implementation inprogress
incompatible
Resolving issue may not be backwards compatible
lang
Relates to the Ballerina language specification
Milestone
Currently objects have separate symbol spaces for methods and fields.
AFAIR the logic for this was to make the field symbol space similar to records and not have it be polluted with double underscore methods. But
Overall it therefore seems better to have a unified symbol space.
With this, #98 is solved simply by allowing field access to be applied to a method: the result will be a closure of the function with self bound to the particular object.
Similarly, #257 is solved by making method call syntax when applied to a field of function type call the function.
The text was updated successfully, but these errors were encountered: