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

Template Expression : typecasting #651

Closed arakov closed 2 months ago

arakov commented 2 months ago

Is your feature request related to a problem? Please describe. Template expression can be used for more intuitive typecasting

Describe the solution you'd like Instead of current solution, which a bit complex / not intuive

cast ChatMember(client.Parameter)

a template is proposed (similar to C#)

client.Parameter :as ChatMember

Similar

client.Parameter :of ChatMember

is analogue to:

client.Parameter.instanceOf(ChatMember)
arakov commented 2 months ago

Implemented in ELENA 6.0.10