Re: gtkmm and C++0x



> Please keep in mind that explicit mentioning of the actual variable types
> in documentation / examples actually helped me with my learning process.
> Substituting the types with auto may diminish the educational value of
> the documentation.

Agreed.

> For example,
> Gtk::Widget* w = somefunc();
> is somewhat self-documenting in a way that we know that somefunc() returns
> Gtk::Widget* (or similar).

Right.

I had a discussion about this with Daniel once. One of the good uses
of auto would be avoid redundancy.
eg., Glib::RefPtr<Gtk::IconTheme> icon_theme = Gk::IconTheme::get_default();
Here the return type is quite obvious and using auto makes sense to
make the code more readable by avoiding really long statements.

Cheers,
Debarshi
-- 
One reason that life is complex is that it has a real part and an
imaginary part.
    -- Andrew Koenig


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]