Skip to content
dann toliver edited this page Feb 27, 2014 · 4 revisions

Multiple representations for Abstract Data

General
  • 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?
2.4.2
  • 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?
2.4.3
  • 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?
Homework
  • 2.73: a) What was done? Why can't we do the same for number? and variable? 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 for IBM Microsoft Google Insatiable Inc. How should records be structured for this? b) Implement get-salary. How should the record be structured for this? c) Implement find-employee-record. d) When IBM Microsoft Google Insatiable 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 and message-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:

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...

weekly recap message

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

Clone this wiki locally