Removing deprecated Context.compileFunctionsWithDynamicScopeFlag

76 views
Skip to first unread message

Hannes Wallnöfer

unread,
Nov 3, 2011, 4:26:32 AM11/3/11
to mozill...@googlegroups.com
While I'm at it, I'd also like to propose removing support for the
old, deprecated Context.compileFunctionsWithDynamicScopeFlag and
Context.setCompileFunctionsWithDynamicScope(). This has been replaced
by Context.FEATURE_DYNAMIC_SCOPE long time ago. It's confusing to have
both still around, and I remember vaguely that the old flag is broken
in some way (which is probably why it has been replaced).

Generally speaking, I think dynamic scopes are a bad idea because they
break closures, but that's a different story (and note that this comes
from someone who has been using dynamic scopes for years :)

So is anybody out there still using
Context.setCompileFunctionsWithDynamicScope()?

Hannes

Attila Szegedi

unread,
Nov 3, 2011, 3:11:41 PM11/3/11
to mozill...@googlegroups.com
I'm with you on both counts meaning (a) I agree dynamic scopes are a bad idea and (b) yes, let's remove the deprecated way of activating them.

Attila.

Hannes Wallnoefer

unread,
Nov 19, 2011, 8:00:54 AM11/19/11
to mozill...@googlegroups.com
Done: https://github.com/mozilla/rhino/commit/71b0dc12edcc4811467ca8ee00f377625d6fb02b

I spotted another candidate for removal: the old XMLBeans based E4X implementation. The code is in *terrible* shape, it's basically unmaintained and untested (dozens of test failures that the new implementation all pass), and the W3C DOM3 API the new implementation relies on has been part of the JDK sincd 1.5 (and is also available on Android). Opinions?

Hannes
Reply all
Reply to author
Forward
0 new messages