Mail Archives: djgpp/1997/09/14/23:02:23
Shawn Hargreaves wrote:
> But maybe most importantly, is Allegro not already quite object oriented
> enough? Just compare a typical bit of code:
>
> BITMAP *bmp = create_bitmap(320, 200);
> clear(bmp);
> putpixel(bmp, 10, 10, 2);
> destroy_bitmap(bmp);
>
> with a C++ implementation of the same:
>
> BITMAP *bmp = new BITMAP(320, 200);
> bmp->clear();
> bmp->putpixel(10, 10, 2);
> delete bmp;
>
Bravo! I (of course) originally started programming in C and then moved
to C++ because I liked the IMHO easier and customizable syntax. What I
have realized while studying the Allegro code and writing DEGUI is that
C can also be wonderfully object oriented, if it is used correctly.
Doug Eleveld
- Raw text -