Hacker News new | ask | show | jobs
by shalabhc 3192 days ago
I've seen some of Bret Victor's talks but your description made it click!

> the source code is not technically stored with the class object

This is more of an optimization choice, perhaps? Given the link is maintained, it might be OK to say the source code and the bytecode form are two forms representing the same object?

2 comments

Nothing is technically stored with the class object (everything is made from objects related by object-references). Semantically everything is "together". Pragmatically, things are where they need to be for particular implementations. In the early versions of Smalltalk on small machines it was convenient to cache the code in a separate file (but also every object -- e.g. in Smalltalk-76) was automatically swappable to the disk -- just another part of the pragmatics of making a very comprehensive system run on a tiny piece of hardware.
"This is more of an optimization choice, perhaps? Given the link is maintained, it might be OK to say the source code and the bytecode form are two forms representing the same object?"

Sure. :)