5 ms·
Hi there, thanks for taking the time to comment. > The hope with sane mode (or whatever less able-ist name it should have) is to have no runtime semantic chang
by otikik 12y ago
Hi there, thanks for taking the time to comment.
> The hope with sane mode (or whatever less able-ist name it should have) is to have no runtime semantic change if the mode directive is not recognized
From my limited understanding, old browsers can't handle 'let' anyway, which is supposed to be used exclusively on this mode (as there will be no 'var'). But you probably know more about this than me.
> making hidden time bombs for older browsers to find blowing up in their faces at later dates: Not Good.
Doesn't that happen all the time? What I mean is: If ES6 becomes widely supported in browsers, pages written on it will make old browsers "blow up", too. Unless the people who program those make two versions, which defeats the point of using ES6 in the first place. The same when a new version of CSS comes out - use that, and the old browsers "blow up", too.
It seems to me it is the nature of the beast - new features make old browsers blow up.
- BrendanEich 12y agoIt turns out `let` is usable in most browsers today, and in some older ones. The point is there's no extra opt in and no forked runtime semantics. > Doesn't that happen all the time? You're talking about new syntax bombing old browsers. That's not the issue. The issue is same syntax in old and new, works (for whatever value of "works") in old and new, but differs in meaning due to a "use sanity"; directive.
- otikik 12y agoFair enough. You have probably heard arguments similar to mine hundreds of times, thanks again for answering. For what is worth, I never depend on the truthyness of falsyness of 0 and "", and always test for them explicitly, so it will not affect my code if in a distant future javascript starts treating them as truthy. Just, you know, in case you change your mind in the future. Good night!