COMPSCI 61A Chapter Notes - Chapter 2.7-2.9: Message Passing, Eval, Linked List
zogo39484755 and 6 others unlocked
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents
Document Summary
2. 7. 3 multiple representations: message passing: objects interact by looking up attributes on each other, @property decorator allows functions to be called without call expression syntax. Interface: set of shared attribute names, along with a specification of their behavior. Iterative coercion: one type coerced into another via intermediate types. 2. 8. 1 measuring efficiency: can measure how many times a particular function is called, to understand space requirements of a function, must specify generally how much memory is used, preserved, and reclaimed in environment model of computation. Incrementing by one creates another function call that calls many similar function calls: you just multiplied the amount of execution code. 2. 9 recursive objects: when an object of some class has an attribute value of that same class. In general, want to perform pruning before performing recursive functions. Intersection: returns another set with elements in common with both lists: from least to greatest.