Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Friday, January 16th, 2004

Time Event
3:03p
"with" keyword
Just about everyone advises javascript programmers not to use "with", because it's so error-prone. What are the rules of "with" statements? What exactly makes it error-prone? Is it because the rules themselves are unclear?

The reason I ask is that I'm writing a javascript code compressor that, besides stripping comments and whitespace, replaces variable names with shorter ones (I know, there are several such programs online, but all the ones I've tried have had serious flaws). I never use "with" myself, but I'd like to be able to brag that my program can handle any valid javascript code. ;)

I'm about to start experimenting with it, but if anyone knows off hand, please share.

<< Previous Day 2004/01/16
[Calendar]
Next Day >>
About LiveJournal.com
Image