AS3 provide several way to handle something like java Map, but what’s the difference with Dictionary, Object and dynamic?
AS3 provide several way to handle something like java Map, but what’s the difference
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An Object can be used as a map, where the key is a simple string. An objects purpose though is not solely to work as a map, it just happens, that you can use it as such.
A Dictionary is a key/value map, where the key can be an object, too. This is useful, if you want to find values based on a specific object, that you have. The purpose of a Dictionary really is, to be used as a map.
The ‘dynamic’ keyword is used to make your own class be extendable in the way, that you can put things into an instance of that class at run-time. Something, which you cannot do, if you do not use the keyword ‘dynamic’.