Creating Tuples: An Exercise in Spontaneous Existence
Unlike certain philosophical positions that require extensive meditation to manifest reality, tuples simply are the moment you declare them. There’s no make-tuple ceremony, no tuple-please-sir-may-I-have-one function call. You simply write:
(set point #(10 45))
And the tuple springs into being with all the enthusiasm of a quantum particle that’s just been observed. The variable point now refers to this tuple, and somewhere in the bowels of the BEAM virtual machine, memory has been allocated, electrons have been shuffled about, and the universe has been ever-so-slightly rearranged to accommodate your data structure.
When tuples become obsolete—when no variable points to them anymore, when they’ve been forgotten by the very code that birthed them—the garbage collector sweeps in like a cosmic janitor and reclaims their memory. You need not worry about this. The garbage collector is surprisingly good at its job, having spent decades perfecting the art of cleaning up after programmers.