Skip navigation
Currently Being Moderated

Why Array.as class is made dynamic?

Jun 4, 2012 6:55 AM

Tags: #dynamic #array #keyword

Why Array.as class is made dynamic?

 

public dynamic class Array

{

     ...

}

 
Replies
  • Currently Being Moderated
    Jun 4, 2012 10:04 AM   in reply to Sumit Jain

    I don’t know for sure, but it might be to allow accessing it via array.1 which was legal.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 6, 2012 12:24 PM   in reply to Sumit Jain

    For one thing, array "elements" are merely dynamic properties. For example, when you access a[0] you are really accessing a["0"], i.e., a dynamic property named "0".

     

    For another thing, Ecmascript requires Array to allow accessing any property, such as a["foo"].

     

    Gordon Smith, Adobe

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points