In fact, most garbage collection variants are very pleasant to implement if you assume that your system only has one type of object. (Simple enough to ask undergraduates to do as a weekly homework.) Things get more hairy when you (1) want to support multiple objects, and (2) want to make it fast.