|
 |
Warp wrote:
> Mike Raiford <mra### [at] hotmail com> wrote:
>>> So you can't have arrays?
>
>> You can, but not in the sense of a contiguous block of memory containing
>> the data sense.
>
> But then the answer is "no".
I don't think Mike read the papers. Of course you can have an array of
contiguous memory. You declare it as an array of structs, just like you
would in C.
They even have a mechanism whereby you can declare a struct with a
definite memory layout that multiple different languages can reference,
and an operator that says "treat this as the representation of an
object", which basically adds the vtable after the fact for your
particular program. I.e., you can cast an object in memory from a flat
data structure into a full object-oriented object with inheritance and
methods and all that, without moving the memory that holds the fields.
And since you're sharing that memory with different languages, you can
have the different languages cast it into different objects without
munging it up for any one particular language.
--
Darren New / San Diego, CA, USA (PST)
Ever notice how people in a zombie movie never already know how to
kill zombies? Ask 100 random people in America how to kill someone
who has reanimated from the dead in a secret viral weapons lab,
and how many do you think already know you need a head-shot?
Post a reply to this message
|
 |