Topic: C++ FAQ Lite suggestions


Author: "Early Ehlinger" <early@respower.com>
Date: Wed, 25 Jun 2003 15:13:27 +0000 (UTC)
Raw View
"James Kanze" <kanze@alex.gabi-soft.fr> wrote:
> The FAQ doesn't get rewritten every year, just to reflect the most
> recent fads.  In practice, too, I don't think template-oriented
> programming has become as big as the articles in the news groups might
> let us think, if only for the simple reason that many practical
> programmers still have to deal with older compilers, which aren't up
> to scratch for most of the meta-programming tricks.

For that matter, a lot of programmers still have to deal with other
programmers who have refused to learn anything since college and only want
to deal with procedural code.  I had to deal with this at 3 of my past 4
jobs.  It was difficult enough to sell OO architectures to these chaps, let
alone template magic!

> (...Only that it shouldn't drop any of the OO stuff just yet.)

Yet?  I would say *ever*.  C++ is a multi-paradigm language.  Want
procedural programming?  No problem.  Rules-based?  No problem.  OO? Easy.
Metaprogramming? Absolutely.  Functional? Er - kinda sorta, but we'll claim
a yes anyway :-)

--
-- Early Ehlinger CEO, ResPower Inc - Toll-Free : 866-737-7697
-- www.respower.com -- 500+ GHz Supercomputer Starting At USD$0.50/GHz*Hour






      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]






Author: Ed Avis <ed@membled.com>
Date: Wed, 25 Jun 2003 15:13:27 +0000 (UTC)
Raw View
Surely the FAQ should cover questions which are frequently asked, so
if more template programming questions appear in this and other
newsgroups, they will be gradually assimilated into the FAQ.

--
Ed Avis <ed@membled.com>



      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]






Author: Daryle Walker <dwalker07@snet.net>
Date: Sun, 22 Jun 2003 00:45:20 +0000 (UTC)
Raw View
25.12 mentions how the constructor of the most-derived class activates
the constructor of the virtual base class(es).  The author gives the
practical advice that your class constructor must be ready to mention a
constructor for every virtual base class in its heirarchy.  I think it
should also mention that your class version of the constructors may not
be called, if your class gets a derived class of its own, so your class
must be prepared to have a virtual base class with a valid state not of
your class's choosing (this is not a problem if the virtual base class
only has the zero-argument constructor).

29.19 mentions a difference between enumeration types and int is that
operator ++ is not defined for enumeration types.  I think that the fact
that enumerations have the advantage over int in that custom operators
(like ++) can be defined for enumeration types should be mentioned!

It seems to me that template-oriented programming has become big over
the years, even more popular over OO.  The FAQ is heavily weighted to OO
aligned questions, and just part of one section for templates.  Many
non-OO questions still have OO considerations attached, but not updated
for template considerations.  Maybe a lot more template stuff needs to
be added, especially template gotchas.

Daryle

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]






Author: James Kanze <kanze@alex.gabi-soft.fr>
Date: Sun, 22 Jun 2003 15:27:59 +0000 (UTC)
Raw View
Daryle Walker <dwalker07@snet.net> writes:

    [...]

|>  It seems to me that template-oriented programming has become big
|>  over the years, even more popular over OO.  The FAQ is heavily
|>  weighted to OO aligned questions, and just part of one section for
|>  templates.  Many non-OO questions still have OO considerations
|>  attached, but not updated for template considerations.  Maybe a
|>  lot more template stuff needs to be added, especially template
|>  gotchas.

The FAQ doesn't get rewritten every year, just to reflect the most
recent fads.  In practice, too, I don't think template-oriented
programming has become as big as the articles in the news groups might
let us think, if only for the simple reason that many practical
programmers still have to deal with older compilers, which aren't up
to scratch for most of the meta-programming tricks.

(That doesn't mean that the FAQ shouldn't address more template
questions.  Only that it shouldn't drop any of the OO stuff just yet.)

--
James Kanze                                  mailto:kanze@gabi-soft.fr
Conseils en informatique orient   e objet/
                      Beratung in objektorientierter Datenverarbeitung
11 rue de Rambouillet, 78460 Chevreuse, France  Tel. +33 1 41 89 80 93

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]






Author: John Potter <jpotter@falcon.lhup.edu>
Date: Mon, 23 Jun 2003 16:06:38 +0000 (UTC)
Raw View
On Sun, 22 Jun 2003 15:27:59 +0000 (UTC), James Kanze
<kanze@alex.gabi-soft.fr> wrote:

> Daryle Walker <dwalker07@snet.net> writes:

> |>  It seems to me that template-oriented programming has become big
> |>  over the years, even more popular over OO.  The FAQ is heavily
> |>  weighted to OO aligned questions, and just part of one section for
> |>  templates.

> The FAQ doesn't get rewritten every year, just to reflect the most
> recent fads.

This quote from 6.8 might help.

| The standard library contains numerous templates that illustrate
| "generic programming" techniques, which are also great, but
| virtual functions are still at the heart of object-oriented
| programming using C++.

This does sound a bit like Smalltalk faq lite or cfront 2.x faq lite.
The attitude is obvious.

I wonder what this subject has to do with the C++ standard?

John

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]