OOPSLA: Seriously, No Runtime Semantics

Mon 24 October 2011

This is Dart:

[sourcecode lang="JavaScript"]
main() {
var x = 'foo';
int s = x;
print('Shirley, you are joking');
}catch(var e){
print('Surely this will be executed.');

Note that I've declared s to be of type int and, just to make sure the point is clear, have assigned this int a value foo which, if there were runtime type semantics, would throw an exception (and, if there were mandatory typing, wouldn't even compile). In Dart, the output of this is: