charly-vm
charly-vm copied to clipboard
Builtin classes should be able to override constructor as regular function
Would allow neat and tidy syntax for cast operations, e.g:
Int("25")
Number(some_user_input)
Tuple(some_list)
This can be implemented as an additional check after the kFlagNonConstructable check at interpreter.cpp:115.
The runtime should just call the constructor directly without creating an instance value first