logo       

Demystifying "most Smalltalk’s don't directly support multiple inheritance": msg#00105

Subject: Demystifying "most Smalltalk’s don't directly support multiple inheritance"
List,

haven't you heard that Smalltalk and Squeak do not directly support multiple inheritance, time and again? But that Perl, Python and Ruby do (to some extent)?
- http://www.google.com/search?q=python+ruby+multiple+inheritance

Well, that is not the case for Smalltalk since the time that VMs are implemented by using the specs of the Blue Book.

I have attached a small .st file which demonstrates that the *unchanged* VM *must* support multiple inheritance (for message sends), or else it won't work properly. It's a matter of view on what the VM does for you :-D

With the exception of support code for exceptions [pun intended] the attached examples work on VMs which implement the super send from the Blue Book.

The first example demonstrates that multiple inheritance works; in this example it is also checked that the requesting method qualifies (that the instances qualify is checked at fileIn time).

The second example does a message tally and shows that there is less than 50% overhead when possible walkbacks are guarded at every multiple inheritance message send.

The third example employs the existing method cache of the VM (the original Squeak VM) for multiple inheritance message sends and thus minimizes the overhead to less than 5% (and the demo is written in .st code :-)

Again, this all exists *unchanged* for decades. It only had to be brought to the surface?

-------

I would be very interested to see if my examples run on other platforms and VMs, please post your experience. Thank you.

It'd be equally interesting if the approach had been used before.

/Klaus

Attachment: Multiple-Inheritance.st
Description: Binary data





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe