(picture)

October 03, 2003

outwith

Lippert strikes one out of the park: "With" considered harmful. The clearest, most eye-opening exposition of JavaScript's "with". In Eric's comments:

devs who are used to the VB-style "with" -- which is a syntactic sugar -- fall into the trap of believing that JScript "with" is also a syntactic sugar when it emphatically is not! ...it allows devs implement dynamic scoping rules in a lexically scoped language -- but 99.9% of the developers who use "with" are looking for the sugar, not dynamic scoping!