CSC302 2011S Programming Languages

Reading: Io (1)

Reading: Tate 3.1 (Introducing Io) and 3.2 (Skipping School, Hanging Out).

Please either (1) submit a good question on Piazzza by 9 p.m. on Tuesday, 1 February 2011 or (2) respond to one of the questions by 10 p.m. on Tuesday, 1 February 2011.

Student Question: Do parent objects keep track of children, or is it a bottom up relation only?

Student Answer: My understanding is that it is a one way relation. If it wasn't then the object would have a slot that would return all the children, and I couldn't find such a slot. A lot show up if you run "Object slotNames" so I may have missed it.

Student Question: Are slots themselves objects? Not the contents of the slot, but the slot. If there even is such a thing. I ask because in IO supposedly everything is an object.

Student Answer: After a bit of messing around in the interpreter it seems to me that slots aren't objects. There doesn't seem to be a way to get the slot itself and not the contents by messaging the object. ( Though that could be caused by some clever redefining ) It also doesn't quite make sense for a slot to be an object, since an object is defined as something that has slots (and a proto).

Student Question: In the interview (pg. 58), the creator of Io states that its flexibility makes it slower in common uses, but possibly much faster than C. How is its standard performance compared to something like Ruby, and what are these advantages that can make it faster than C?

Student Answer: Good concurrency would make it faster than C in some cases. An example would be IO. I believe that doing asynchronous IO in C would require a thread for every socket, which would result in a lot of overhead if there were many sockets. IO's lightweight concurrency constructs make it easy to avoid that.

Instructor Comment: Asking about comparative performance of Io and Ruby is somewhat beyond the scope of this. The student answer is nice.

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Mon Feb 7 08:49:09 2011.
The source to the document was last modified on Mon Feb 7 08:47:59 2011.
This document may be found at

You may wish to validate this document's HTML ; Valid CSS! ; Creative Commons License

Samuel A. Rebelsky,