This is cache friendly and extensible but it is much more complex and not really easy.
Every entity has his properties and you can access them via C++/Java/C#... with a hash map or a normal map (other containers are welcome ). The scripting interface can be object oriented, so that you will get an object pointer, where you can access the members and change the properties in an object oriented manner, or also be data based.
/* Stupid Example */ /* C++ */ Point pt = dataManager->property("block1", "pos").toPoint(); /* Lua - Object Oriented*/ function blockClickHandler (block) Point pt = block.position(); end /* Lua - Data Based*/ function blockClickHandler (position) Point pt = position; end
This above is really a simple and incomplete example but shows some ways.
Many big games (with scripting languages), applications and websites use data based design. I really suggest it!