ELENA-LANG / elena-lang

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
https://elena-lang.github.io/
MIT License
227 stars 23 forks source link

Invoking extension by message name literal #574

Open arakov opened 1 year ago

arakov commented 1 year ago

Currently it is not possible to invoke an extension, so the following code fails:

import extensions;

public program()
{
   var m := mssg print;
   m(console,"Hello");
   m(console," ","World","!");
}

Could it be possible, e.g. the compiler may recognize that there is an extension with the same name and use the special class to handle extensions

arakov commented 1 year ago

If the feature will be implemented, the documentation should be updated as well