Why does legacy content break when making array-likes real arrays?
domenic at domenicdenicola.com
Sun Dec 30 14:23:46 PST 2012
> From: es-discuss-bounces at mozilla.org [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Anne van Kesteren
> Sent: Sunday, December 30, 2012 17:18
> On Sun, Dec 30, 2012 at 10:22 PM, Axel Rauschmayer <axel at rauschma.de> wrote:
> > 5. Array-like objects [not completely fixed (DOM...), but `arguments`
> We've made some effort towards changing some of this, but legacy content is against us. :/
I saw this happen, and was sad, but never understood what the legacy problem was.
Similarly, when people ask me "why can't they just make arguments a real array" (perhaps with magic aliasing behavior in sloppy mode), I don't know the answer.
So just out of curiosity, how does legacy code break when making array-likes into real arrays? I feel like the Liskov Substitution Principle should have our back here.
More information about the es-discuss