You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constructing arbitrary type values remains a clunky operation in the current version of the language. The main reason which makes this process difficult is that calling a constructor requires a fully qualified type name. Typing the full name by hand would be error-prone and tedious. Introducing a namespace import feature would complicate the workflow syntax.
A better solution might be to allow operator output, input and property types to provide the context for the constructor call, with the operator simply applying existing type conversion semantics. This would allow creating something like a generic ConvertType operator which could double-down as an explicit casting and constructor.
The text was updated successfully, but these errors were encountered:
glopesdev
changed the title
Add support for calling constructors from operator output, input or property types
Allow calling constructors from operator output, input or property types
Jan 14, 2025
Related to #742.
Constructing arbitrary type values remains a clunky operation in the current version of the language. The main reason which makes this process difficult is that calling a constructor requires a fully qualified type name. Typing the full name by hand would be error-prone and tedious. Introducing a namespace import feature would complicate the workflow syntax.
A better solution might be to allow operator output, input and property types to provide the context for the constructor call, with the operator simply applying existing type conversion semantics. This would allow creating something like a generic
ConvertType
operator which could double-down as an explicit casting and constructor.The text was updated successfully, but these errors were encountered: