-
Notifications
You must be signed in to change notification settings - Fork 10
SICP 2.4
- How does this compare to the approach we took with rational number/point/vector arithmetic?
- What are the pros and
cons
of each approach? - Most of this chapter is dedicated to problems related to programming in the large. Can you think of problems (other than type conflicts, obviously) emergent in teams of multiple programmers? In teams composed of multiple teams?
- Can you think of other solutions to the problem of representation collision than the one presented?
- What problems does the type tagging process solve (both computational and social)? Are there places where any of these problems could still arise? How would you close the loop?
- The name used for "programming with a type-dispatch table in mind" is "Data-directed programming". Is this an appropriate name? Have you heard others?
- Have you seen something that takes the columnar ("intelligent data object") approach described under the Message passing heading?
-
2.73: a) What was done? Why can't we do the same for
number?
andvariable?
b) Show the corresponding methods for sums and products. c) Show the additional methods for something else. d) How does your implementation change with changes to the tag order? -
2.74: a) Implement
get-record
forIBMMicrosoftGoogleInsatiable Inc. How should records be structured for this? b) Implementget-salary
. How should the record be structured for this? c) Implementfind-employee-record
. d) WhenIBMMicrosoftGoogleInsatiable takes over a new company, what do they need to change to incorporate into the central system? -
2.75: Implement
make-from-mag-ang
in message-passing style -
2.76: Describe describe which of
explicit-dispatch
,data-directed
andmessage-passing
styles is most appropriate for: a) a system in which new types are often added? b) a system in which new operations must often be added?
Links:
- https://medium.com/p/8a3b4bedf68c
- http://journal.stuffwithstuff.com/2012/12/19/the-impoliteness-of-overriding-methods/
- http://cs.stackexchange.com/questions/2301/categorisation-of-type-systems-strong-weak-dynamic-static/
Not links:
- note 45: multiple arguments of different types -- do we need a multimethod to catch each case?
- no table passed in for put and get -- they're magical global globbers?
- oh, btw, there's this OO thing...
Hello!
We had great conversation about type theory this past week, with Leo providing the moderation. Sussman and Abelson managed to introduce types, dynamic dispatch, multimethods, message passing, and object orientation in a single chapter, and made it all seem like a natural extension to our previous work and a solution to problems we'd noted in earlier homework implementations. Amazing!
This coming Friday we'll be covering Generic Operations (sections 2.5.1 and 2.5.2), with Scott in the moderator's seat. I'll apply a little coercion (sorry, couldn't resist) by saying that this chapter has some really interesting ideas that you won't want to miss.
Leo's moderation notes, along with a few links to articles I mentioned, are in the wiki: https://github.com/CompSciCabal/SMRTYPRTY/wiki/SICP-2.4-notes
Happy coding!
Jan 19