How are types implemented, and how is data stored?

Hi! After discussing custom types, I am now wondering how Snap! currently handles the built-in types. How is data (especially ringed blocks) stored internally?

The best way to find out, is to just run this

Untitled script pic - 2024-12-11T193106.601

Then just inspect the value in the browser console. It's really not hard to figure out yourself.

It's probably a whole lot simpler than you're expecting.

I think the normal types (number etc) we just inherit from Javascript. The more unusual ones are also sort of inherited from JS, but they're object classes.