"dev42" wrote:
( I moved it here as it really is another topic. )
You'll do well to link also
where did you move it from. Not everyone (me in particular) reads every thread or in particular order.
Capitals "issue"(?)/ possible confusion: doesn't Java designate lower case as intrinsic and first letter Capital as Object? Furthermore, you weren't consistent and used "integer" further down. Yes, BrightScript is BrightScript and can/should have its own conventions. ( Sorry if nitpicking, but trying to err on helpful. ) Perhaps expand, "An object type is one of Array, Associative Array or Brightscript Component." to include more BrightScript correct code? ie roArray, roAssociativeArray? Or is there an instrinsic "Array" type too?
BrightScript is a case-insensitive language, so capitalization is a matter of style (or lack thereof). Java is a completely different can of worms.
roArray and
roAssociativeArray are BS components, just like everything else named
roSomething, see
http://sdkdocs.roku.com/display/sdkdoc/Components for the list. So arrays and hashes (AA) should not be explicitly mentioned there, it will be tautology. Admittedly those two have some seemingly "magic" properties, like literal constructor/notation (a = [1,2] and d = {field: 1}), dot-operator (d.field) and indexing brackets (a[1], d["field"]) - but those are largely "syntax sugar" and result in method calls under the sheets.
OTOH the types whose name does not start with "ro" are intrinsic. Those need small amount of memory (4 bytes data), so they are passed around "as-is" values and not pointers (which is the case for roComponents). There are some quirks regarding String and Double but let's not delve into that now.