I honestly consider the outright statements against with to be
overboard. I've been using the with statement quite reliably inside my
code at work. I think the issue is misuse of with. One shouldn't go
using with in the intent to do `with(foo) {bar = 'baz';}` and have
foo.bar modified. In fact I don't believe with should be used with any
intent to set at all (except for the case where Bar exists in foo, and
you want to set .someprop on Bar, that is a different case). With is
quite effective in use for importing things like libraries into local scope.
ns.my.lib; Defines camelCaseMe, and runMe; You can use `with(ns.my.lib)`
with the intent to allow you to use camelCaseMe and runMe in the local
scope.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [
http://nadir-seen-fire.com]
-Nadir-Point & Wiki-Tools (
http://nadir-point.com) (
http://wiki-tools.com)-MonkeyScript (
http://monkeyscript.org)-Animepedia (
http://anime.wikia.com)-Narutopedia (
http://naruto.wikia.com)-Soul Eater Wiki (
http://souleater.wikia.com)Aleem B