Ian Piumarta wrote:
Why not use message syntax?
You presented an interesting idea to annotation type assert to expressions which can be checked at runtime. The whole idea about a static type system however ist, that you can check for consistency at compile time (aka method accept time). Furthermore, you also what to add type annotation to object containers (variables, instance variables, temporaries and method parameters). This can't be done with your suggested system other than
method: arg | temp | arg type: Integer. temp = arg squared. temp type: Integer.
which IMHO doesn't help to document the variable types as it's not as clear as
method: arg<Integer> | temp<Integer> |
or
method: {Integer}arg | {Integer}tmp |
or
method: arg@integer | tmp@integer |
bye