> I guess it's an obvious way to design it.
It's an obvious way to design it... if you start with explicitly declared properties in your language.
For JavaScript a state-of-art for a long time was more like this:
+-------+
| *---+-> hashtable for properties
+-------+
| |
~~~~~~~~~ various metadata (e.g. prototype chain)
~~~~~~~~~
| |
+-------+
all properties mixed together, all stored in a hash table, etc.The non-obvious thing to design here is how you escape from the realm of hashtables into the realm of something both more compact and faster to work with (given certain statistical assumptions about the properties of the code).