Firstly, I think that expr: type syntax for type ascription is confusing.
Secondly, it is impossible to parse as far as : is reserved for one line bodies of control-flow syntax units like while, for, etc.
Anyway, for now, having no plan for type ascriptions, I need to propose an alternative for the future to establish a lack of non-block of using : for one line bodies.
I think it is more clear and impact to have the of keyword for type ascriptions.
Properties
|
|
| Precedence |
Same as as coercion operator |
Firstly, I think that
expr: typesyntax for type ascription is confusing.Secondly, it is impossible to parse as far as
:is reserved for one line bodies of control-flow syntax units likewhile,for, etc.Anyway, for now, having no plan for type ascriptions, I need to propose an alternative for the future to establish a lack of non-block of using
:for one line bodies.I think it is more clear and impact to have the
ofkeyword for type ascriptions.Properties
ascoercion operator