Showing posts with label delegation. Show all posts
Showing posts with label delegation. Show all posts

Friday, 15 November 2013

"Classes. He would like to replace classes with delegation."

I had the intuition from my software engineering days, but for the last few months (due to our Forsaking Inheritance paper) I have been seeing stuff about dropping inheritance or advocating that inheritance is bad... everywhere.... from very old sources to very recent ones, spanning a period of nearly three decades...
  1. James Gosling 's interview that I first saw some months ago at Simon Peyton Jones' talk at the OPLSS'13 (There were two main questions: What would you take out? What would you put in? To the first, James evoked laughter with the single word: Classes. He would like to replace classes with delegation since doing delegation right would make inheritance go away. But it's like Whack-A-Mole (more laughter) since when you hit one mole, er, problem, another pops up.)
  2. Why extends is evil.
  3. Recent example from the C++ themed online conference GoingNative 2013, Inheritance Is The Base Class of Evil (general example of a talk, demonstrating that inheritance is still discussed as a "it would be best to avoid" feature.)
  4. Patterns for subclassing to avoid embarrassing situations with library clients, The Art of Subclassing.
  5. The are even refactoring options for it (e.g., IntelliJ's "Replace Inheritance with Delegation".)
  6. There are solutions with Java annotations like lombok's @Delegate
  7. delegate(*methods) in Ruby on Rails
  8. Go (the programming language) diverges from the usual notion of subclassing, by embedding types together (without late binding as mentioned explicitly) simplifying composition [SO]. The Gang of 4's crucial principle is "prefer composition to inheritance"; Go makes you follow it. (I liked how the so poster put it).
  9. The End Of Object Inheritance & The Beginning Of Anti-Rumsfeldian Modularity by Augie Fackler and Nathaniel Manista
  10. .... and last but not least a whole category of academic work on Subtyping, Subclassing, and the Trouble with OOP in general (article and refs by Oleg Kiselyov.)

Monday, 21 October 2013

Attending SPLASH 2013

The following two weeks will be crazy. We are packing our bags to travel to Indianapolis, Indiana to present our current work and to attend the SPLASH 2013 conference. Our research team presents three papers at OOPSLA, one of which is our Forsaking Inheritance paper about a new design we proposed (we named it DelphJ), a Java-based object oriented language that eschews inheritance, in favor of class morphing and (deep) delegation. Our colleagues' papers to appear in OOPSLA are: Soundly Completing a Partial Type Graph and Set-Based Pre-Processing for Points-To Analysis.

Alongside with OOPSLA we present our preliminary work on introducing Reified Generic Parameters with Java Annotations at GPCE and at the Splash Poster Session. We introduced the concept of a new annotation that annotates generic types indicating them as reifiable and for those who haven't heard about type annotations before, this is the new cool extension to Java annotations that is specified by JSR 308 and will be included in Java 8.

See you in Indianapolis.

http://splashcon.org/2013/images/Splash_WebBanner-shadow.png 
GPCE'13