[net.lang.c++] enhancement: have C++ announce release number when it runs

jhoward@mntgfx.UUCP (07/17/86)

In an environment such as we have with C++, where the compiler will occasion-
ally be undergoing revs or intermediate patches, I would find it useful if the
compiler would announce a summary at its completion. For example, if it said
something like:
	2 errors, 9 warnings; CC release 1.1 (AEGIS DOMAIN/IX)
or such, we'd be able to know what compiler we are running. Perhaps
Dr. Stroustrup would consider making this a part of the standard operation of
C++? (I realize there might be no way to write code to output the machine/os
id in a general way, but at least the release number would be very useful.)

Jim Howard, Mentor Graphics, 8500 SW Creekside Pl., Beaverton, OR 97005-7191
(503) 626-1369

...ucbvax!tektronix!sequent!mntgfx!jhoward

rcd@nbires.UUCP (07/21/86)

> In an environment such as we have with C++, where the compiler will occasion-
> ally be undergoing revs or intermediate patches, I would find it useful if the
> compiler would announce a summary at its completion...

In an environment such as many of us have, I think it would be appreciated
if the compiler would be <very> quiet unless it has something of substance to
say.

In UNIX, this is almost a sacred precept (not that there aren't
blasphemers:-).  I wish it were so in other systems.  That is, if you want
the compiler to tell you about itself (instead of doing its normal job,
which is to compile a program), why not ask it that question?

If YOU, personally, feel a need to be reminded of the current version of
the compiler, fine.  That may very well make sense in your environment, but
can't you achieve it with a shell script to control the compilation and
announce the version at the end?

I'm not just being peevish.  (I AM being peevish, but not JUST so.)  It can
be quite annoying to filter the output of a commonly-used program to get
rid of the stuff that doesn't need to be there.  It is more reasonable to
expect a program to generate just the output that is needed, than to expect
it to do extra work to generate anything that MIGHT be needed and then let
its users do extra work to get rid of the noise they don't need.
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
   ...At last it's the real thing...or close enough to pretend.

ian@sq.UUCP (07/21/86)

This does not strike me as a good idea. Making programs chatter about 
things that are generally irrelevant is not a step in the right
direction. The approach we have taken is to provide an option
(-V seems common enough for this purpose) to many of our programs;
under -V, the program prints a version number in addition to
its normal output. But our programs are SILENT in the absence
of erroneous input, and that's in keeping with the way
(almost) everything else in UNIX operates. A -V option would
probably not be hard to add to C++ if you have the source.

-- 
Ian F. Darwin		| The home of...	| Phone 416-963-8337
Director, R&D		| SoftQuad Troff...	| uucp: utzoo!sq!ian
SoftQuad Inc.		| ... troff for the	| home uucp: darwin!ian
Toronto, Canada		|	 80's.		|

whp@cbnap.UUCP (W. H. Pollock x4575 3S235) (07/23/86)

In article <1317@sq.UUCP> ian@sq.UUCP (Ian Darwin) writes:
[in reply to request for verbose CC command]
>... The approach we have taken is to provide an option
>(-V seems common enough for this purpose) to many of our programs;
>under -V, the program prints a version number in addition to
>its normal output.

Another good approach is the one taken by the korn shell; the version
information is kept as an SCCS string.  If you want to know the version
of ksh, you type "what ksh".  If you want to use "-V", a better method
is to have the "CC -V" print the version info and quit, ignoring any other
arguments.  (This way you don't have to provide a dummy dot-C file to just
find the version info.)

From the strong (left) arm of W. H. Pollock,
UUCP:	...{ihnp4,cbatt}!cbnap!whp

	"The opinions expressed above are ficticious.  Any resemblance
	to the opinions of persons living or dead is purely coincidental."

mat@mtx5a.UUCP (m.terribile) (07/23/86)

> > In an environment such as we have with C++, where the compiler will occasion-
> > ally be undergoing revs or intermediate patches, I would find it useful if the
> > compiler would announce a summary at its completion...
> 
> In an environment such as many of us have, I think it would be appreciated
> if the compiler would be <very> quiet unless it has something of substance to
> say.

Indeed, the UNIX philosophy, and the pleasantness of the environment, require
that noise pollution be kept to a minimum.  On the other hand, the system
ought to tell you what it's doing.

Many of the PCC and PCCII based compilers have a ``+V'' option that does
nothing but announce the release number.  This may be the cannonical
solution.  Also, cfront puts its build date into the ``..c'' that it builds,
as a comment.  Perhaps it could write the release as well?

> In UNIX, this is almost a sacred precept (not that there aren't
> blasphemers:-).  I wish it were so in other systems.  That is, if you want
> the compiler to tell you about itself (instead of doing its normal job,
> which is to compile a program), why not ask it that question?
> I'm not just being peevish.  (I AM being peevish, but not JUST so.)  It can
> be quite annoying to filter the output of a commonly-used program to get
> rid of the stuff that doesn't need to be there.  It is more reasonable to
> expect a program to generate just the output that is needed, than to expect
> it to do extra work to generate anything that MIGHT be needed and then let
> its users do extra work to get rid of the noise they don't need.

Here, here.  I wish that programs were more often seen and not heard.
That doesn't mean that there isn't room for ``verbose'' flags or ``statistics''
flags; just that these should not be presumed to be the outspit of interest
to the user when what he needs and wants is the object file.

Program designers should not push their notions of the right way to do it
onto a community that has bought into another way.
-- 

	from Mole End			Mark Terribile
		(scrape .. dig )	mtx5b!mat
					(Please mail to mtx5b!mat, NOT mtx5a!
						mat, or to mtx5a!mtx5b!mat)
					(mtx5b!mole-end!mat will also reach me)
    ,..      .,,       ,,,   ..,***_*.

shopiro@alice.UucP (07/23/86)

If you really want to know the release date, just look at the
intermediate code (output of cfront).  The date is in a comment
right at the top.