On Aug 17, 11:11 am, Stephan Beal <[EMAIL PROTECTED]> wrote:
> People who are unwilling to become comfortable with the language
> they're working in (e.g., by using its available features, such as
> anonymous functions) shouldn't be working in the language.

Perhaps. I'm comfortable with the language, and I see the anonymous
function as just unnecessary clutter.

> i think this would be counter-intuitive. If i pass a string to a
> function and know that it will be executed, i would expect the string
> to be eval()'d, not run in a Function object, and those evaluate their
> code with different scoping rules.

How so? Both are run in the context of the global object, are they
not?

> Shouldn't that be (new Function(f)) instead of (Function(f))?

Same diff, but shorter.

> IMO this change would be far more complex that it seems because, for
> example, the following no longer applies:
> if( typeof f == "function" ) { ... }

Why would you want to do this, anyway?
Once it gets past the initial call to click() or whatever, it is a
function all the way down.
If you define a new Function, the resulting object is typeof
'function'.
There would be no visible effect anywhere else in plugins, etc.

>The cascade of side-effects is enormous.

I don't see any side-effect at all, but I may of course be wrong ;)

Matt Kruse

Reply via email to