Russell Leggett (2014-03-14T17:50:11.000Z)
domenic at domenicdenicola.com (2014-03-21T16:51:19.496Z)
> It is surprising because it looks like it should work like > ```js > export class C {} > ``` > The keyword 'default' looks like a modifier like 'const'. I completely agree with this. It looks like a modifier. In addition to not having an = or some other reason to think it will be evaluated as an expression, "default" *is* a reserved word *and* has special significance here. Yes, it is grammatically unambiguous and can be learned, but this is a question of intuition. The meaning here goes very strongly against my intuition. > I know how named function expressions work and it's still surprising. Same here. If anything, I would say that it makes more sense to go ahead and run with the intuition we seem to be feeling with is that it seems like a modifier of the export. So maybe like: export default class C {} var c = new C(); //works export default function f(){} f(); //works export default let obj = {a:1,b:2}; var a = obj.a; //works