Raku / book

Using Raku – an unfinished book about Raku
https://perl6book.com/
284 stars 49 forks source link

Inheritance section needs a much better example #58

Open moritz opened 13 years ago

moritz commented 13 years ago

In chapter "Classes and Objects", the "Inheritance" section uses Emplyee/Programmer/Cook/Baker/GeekCook as example.

The problem with is that it's pretty arbitrary, there doesn't seem to be an problem it actually solves. One doesn't know what behavior to expect from the classes, since there's no use case.

Instead a problem should be stated, to which a rather natural solution involves inheritance and polymorphism.

See also: http://lists.canonical.org/pipermail/kragen-tol/2011-August/000937.html

pmichaud commented 13 years ago

Perhaps we could steal Jonathan's travel agency example?

AlexDaniel commented 8 years ago

Bump! The docs have a TODO notice written right in the text: http://doc.perl6.org/language/classtut#Inheritance That's not nice, especially given that this issue is from 2011.

coke commented 8 years ago

The book is pretty much dead. Can we get this issue copied over to the doc site?