oop tutorials

Jesse Phillips jessekphillips at gmail.com
Mon Mar 3 14:57:05 PST 2008


On Mon, 03 Mar 2008 17:22:02 +0100, Saaa wrote:

> I want to make a few (5-10?) D OOP tutorials for dsource. That way I can
> learn about oop myself and help D, I hope :)
> 
> They should thus focus on people who never programmed in an oop style.
> 
> Every tutorial should elaborate on the previous one, but on themselves
> also compile into something interesting||useful. The filler code (not
> related to oop but necessary to make it a interesting program) should
> not be too complex.
> 
> Anybody any idea which kind of program suits best? The filler code in a
> ray tracer might just be a bit too complex.

I don't have any suggestions for interesting programs, but some ideas of 
how you may want to cover it. One thing you may want to do is not only 
build off past examples, but to show improvements with newly introduced 
tools.

** Start by writing a class.
**** Static data of a class
** Then extend the class for more use.
**** Keywords private, protected, public should be discussed in their 
relationship to modules.
** Introduce interfaces, maybe turn the first class into an interface
** Concentrate on function overriding and down/up casting.
** Inner classes
** Operator overloading

I don't see templates as part of classes but still might be a good thing 
to cover.


More information about the Digitalmars-d-learn mailing list