CS 4120 PS5

Now suppose instead that the language supported

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: including the objects themselves, their dispatch tables and the code for all their methods. Now, suppose instead that the language supported multiple inheritance and there was a class D defined as follows. casDetnsB C{ ls xed , itd n ; itf){cd 8} n ( oe } Assuming the language implementation is based on sparse dispatch tables, draw what objects of all four classes might look like, and give a table showing the indices of each method. 4. Suppose Xi were extended with higher-order lexically-scoped functions. Then we could write the following code: fnit g:)it g:)it ={ (:n, 1(→n, 2(→n) x it=n+1; :n 2 g) it={rtr x } (: n eun ; i(=1 fn=) rtr g)+g( +g(;/ X eun ( 1) 2) / es le rtr fn1 g g) eun (-, , 1; } Not...
View Full Document

This note was uploaded on 02/07/2013 for the course CS 4120 taught by Professor Andrewmyers during the Fall '09 term at Cornell.

Ask a homework question - tutors are online