Re: gtkmm and C++0x
- From: Murray Cumming <murrayc openismus com>
- To: Alexander Shaduri <ashaduri gmail com>
- Cc: Chris Vine <chris cvine freeserve co uk>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: gtkmm and C++0x
- Date: Wed, 31 Mar 2010 11:02:42 +0200
On Wed, 2010-03-31 at 12:59 +0400, Alexander Shaduri wrote:
> > As soon as g++ supports a finally-standardized C++0x, I would be
> happy
> > to use it in examples.
>
> 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.
> For example,
> Gtk::Widget* w = somefunc();
> is somewhat self-documenting in a way that we know that somefunc()
> returns
> Gtk::Widget* (or similar).
> You can, of course, always mention there that people with C++0x
> compilers
> can use auto instead of the actual type.
I appreciate that, as I once strongly believed in hungarian notation. I
don't any more, though I can't explain why.
I do still get annoyed at Python code with variables of types that are
completely unknown even until runtime. It doesn't help that Python APIs
have awful documentation, of course.
I guess it would be enough to always use meaningful variable names. "w"
is a crappy variable name anyway.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]