wiki:ModelPins

current specification, e.g. on WeatherWidget:

pins: ["-Locale", "+WeatherDesc", "+Temperature", "+Wind", "+Gusts", "+DewPoint", "+Humidity", "+Visibility"]

This is convention to declare that WeatherWidget happens to read Locale from its model and write WeatherDesc, Temperature, Gusts, DewPoint, Humidity and Visibility.

A new convention could look like:

formals: [ {name: "Locale", type: "String", mode: "r"}, {name: "WeatherDesc", type: "String", mode: "w" }, {name: "Temperature", type: "String", mode: "w"}]

Clearly, more verbose but with more room for annotations, for example, argument coercion. The name "formals" comes from the idea that a view's model variables are like formal function arguments, and a function is applied to actual arguments. Note that this call convention metaphor suggests multiple invocation semantics (perhaps call-by need?).

A possible extension for coercion would be something along the lines of

...otherTypes: {int: toString, ...} 

or even in-line functions.

There are also interesting similarities to the