>> It's the reason why developers ought to use ("mystring"==myvar) instead of
>> (myvar=="mystring").
For what reason is this ?
On 23 Feb, 11:36, Aleem B <[email protected]> wrote:
> On Mon, Feb 23, 2009 at 4:24 PM, Daniel Friesen
>
> <[email protected]> wrote:
>
> > I honestly consider the outright statements against with to be
> > overboard.
>
> It's a pedantic discussion around best practices--within that context
> the statements don't sound overboard but I can understand how they can
> easily start to sound overboard when one considers the naive
> use-cases.
>
> > 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.
>
> With power comes responsibility. It is fair to say you are a
> responsible user of the 'with' functionality. However, you assume that
> every developer who touches your code has read and understood the
> implications of using 'with'. For individuals it might be OK, but for
> open sourced projects or organizations it makes sense to adopt best
> practices that pose minimal risk. It's the reason why developers ought
> to use ("mystring"==myvar) instead of (myvar=="mystring").
>
> Not using 'with' is a very prudent practise.
>
> -- Aleem
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---