I "modern" c++ features in my programs which use fltk, but I don't
think fltk is actually hurt that much by not using them itself.  Yes,
Fl_Group could use std::vector, but that code is there and debugged
and it's not too complicated to deal with the children array on your
own.  It could use std::string internally, but really std::string
mostly saves you from malloc/free headaches but once you give them to
fltk it takes ownership anyway.

I think fltk internals *could* benefit from plain old
non-controversial c++ features like classes and virtual methods, e.g.
use Rect and Point types instead of passing masses of ints in an
ad-hoc way and mysterious arrays (I'm thinking of Fl_Group::sizes_),
and virtual Fl_Group::add so you can enforce invariants on children
(e.g. Fl_Scroll has its own clear() but it's not virtual so it's just
asking to be sliced off, and has fix_scrollbar_order sprinkled
everywhere to make up for not being able to override insert(), etc.
etc.

And then lots of other things which are just plain engineering
standards but may be more controversial, like "ref params are always
const".

And Greg, if that's the longest error msg you've seen out of gcc then
you obviously haven't been using templates much.  Pull out boost, make
a mistake and stand back in awe :P

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to