Signals and Threads cover image

Memory Management with Stephen Dolan

Signals and Threads

CHAPTER

Polymorphism in the Unboxed Types

The idea of an unboxed struct is that it's just something which is wider than a normal data value. So there's never any sentation of it on the heap thit's just, if you have a local variable of type unbox pupil of two ints, then that's the same as having two local variables. They live in separate registers. If you pass them to a function that takes up two of its argument lots instead of taking up one, it has to return a wider structure and so on. The idea is that these things will work like normal ocamia s, but will never be anywhere other than the local variable stock or similar goit.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner