Конструкцию «with» убрали в strict mode в ECMAScript 5?
with(){} statements are dead when strict mode is enabled — in fact it even appears as a syntax error. While the feature was certainly
mis-understood and possiblymis-used I’m not convinced that it’s enough to be stricken from the record.
Я, конечно, понимаю чем плоха конструкция with, но отключать её в strict mode… Мне кажется излишним.
ECMAScript 5, кстати, будет в FireFox 4.
Комментарии 6
Да, лучше попробовать исправить недостатки, а не убирать конструкцию полностью.
method1()
method2()
}