samuelgoto/proposal-optional-types

Are errors ever reported?

samuelgoto opened this issue · 0 comments

@erights: What does it mean to erase? What happens in the following scenarios?

var x: TYPE_THAT_DOES_NOT_EXIST = 1; // Does this throw an Error?
var y: ARE_ANY_CHARACTERS_ALLOWED< = 2; // does this?
var z: WOULD_INTERPRETERS_CHECK_IF_THIS_WAS_DEFINED_PREVIOUSLY = 3; // should this?

@erights: observe that, performing these checks doesn't necessarily #breaktheweb, since you are introducing new syntax.

@samuelgoto: oh, interesting observation, since NOT throwing a parsing error here means that we won't be able to throw a parsing error EVER, cornering ourselves. so, we kind of have to make a decision on whether we reserve the right to throw or not early on.