Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[OPINION] Perl 6 object system

Name: Anonymous 2011-05-23 15:16

Hi, /prog/. What are your thoughts on Perl 6's object system?

Name: Anonymous 2012-03-22 20:31

>>14

This is typical GUI in Java:

class Component {
  void paint() {
    // paint background
  }
}

class Button extends Components {
  void paint() {
    // paint button
  }
}


Somewhere else:

for (Component c: components) {
  c.paint();
}


It would be useless without polymorphism. Why use inheritance without polymorphism and not just composition?

Does `switch' really cost less than virtual table lookup?

Sorry for going off-topic.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List