jacomyal / domino.js

[deprecated] A JavaScript cascading controller for fast interactive Web interfaces prototyping.
https://jacomyal.github.io/domino.js
MIT License
54 stars 7 forks source link

Initial value missing = null for unrequired property? #24

Closed ZorGleH closed 11 years ago

ZorGleH commented 11 years ago

Why not assume initial value missing is null when type: '?x'? It could avoid writing explicitly value: null.

jacomyal commented 11 years ago

I'm not sure. It happened to me to forget declaring the initial value or to declare it under the wrong key. And in this case, I am pretty happy to see the error triggered. Finally, this is an error only in strict mode - and that makes sense, I think.