HDTenEightyP/NetNews huggingface dataset:
From: mat@uunet.uu.net!mole-end
Subject: Re: New C++ type: boole
Organization: :
Date: Mon, 27 Jul 1992 07:37:21 GMT

In article <DOUGM.92Jul26151240@titan.cs.rice.edu>, dougm@titan.cs.rice.edu (Doug Moore) writes:
> >>>>> On Sun, 26 Jul 1992 17:59:44 GMT, fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) said:
> 
> 	Dougm> P. S.  The latest draft of the proposal follows.
> 	Dougm> Constructive feedback is still welcome.  ...

> 	Fergus> Um, well, no.  Without intending to insult anyone, I
> 	Fergus> have to say that this proposal has so many flaws that
> 	Fergus> I don't know where to start.  ...

> 1.  I don't like it, because I like to mix types as I now can in C.
> 2.  I don't like it, because it is fundamentally flawed.
> ...

> You claim to belong in category 2.  You belong in category 1.  ...
 
> I can accept that some people don't want change, or don't want a
> boolean type in particular.  If you hold that opinion, express it and
> I won't argue with you.  But don't state that a proposal is full of
> holes (i.e. ambiguities, self-contradictions, contradictions with the
> current standard, etc.) unless you are willing to present them.

> *Constructive* feedback is still welcome.

If you think that Fergus is giving you a hard time, imagine what a group
of language experts will do.  I agree that some of his objections could
be better stated, and `fundamental' may not apply to all of them, but
you will meet a much tougher audience in x3j16.  (I don't want to apply
my prejudices about the proposal's content; I just want to address its
strength before criticism.)

Oh, and yes, if you can state your proposal clearly in fewer words, you
will help your cause.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 uunet!mole-end!mat, Somewhere in Matawan, NJ
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: New C++ type: boole
Organization: Computer Science, University of Melbourne, Australia
Date: Mon, 27 Jul 1992 02:13:18 GMT

dougm@titan.cs.rice.edu (Doug Moore) writes:

>It has been suggested in one piece of mail that my response to Mr.
>Henderson's criticisms were "antagonizing", and in another piece of
>private mail that I accused him of lying.

I think that my original criticisms were probably fairly "antagonizing";
I certainly did not view your reply as accusing me of anything (save
not having a good enough argument :-)

>It was my intent to attack Mr. Henderson's arguments, which I found
>wanting, and not Mr. Henderson himself.  I respect his, or anyone's,
>right to disagree on matters of taste.  But I felt that all of his
>arguments were matters of taste, not "holes" in a proposal.
>
>I certainly did not mean to accuse Mr. Henderson of lying.  I can only
>assume that the correspondent refers to that point at which I suggest
>that, while Mr. Henderson says he finds the proposal flawed, he really
>just prefers not to have a boolean type.  I did not mean to accuse Mr.
>Henderson of duplicity in this.  I meant only that the "flaws" he
>presented were more in the nature of stylistic objections, most of
>which could be applied to any proposal for a boolean type.  I'm sure
>he honestly considered his list to be a list of flaws.
>
>So, I apologize to Mr. Henderson, and to the net, for appearing to
>call him a liar.

Apology accepted. (I didn't find anything in your post offensive anyway :-)

>I still disagree with him.  I'll try to disagree more carefully in the
>future.
>
>Doug Moore
>(dougm@cs.rice.edu)
>
>This program posts news to thousands of machines throughout the entire
>civilized world.  Your message will cost the net hundreds if not
>thousands of dollars to send everywhere.  You will offend hundreds of
>people you don't even know.  Please be sure you know what you are
>doing.

Usenet really is a very difficult medium; attempting to communicate only
in ASCII, we lose the non-verbal cues that provide much of the message in
ordinary conversation. It *is* very easy to offend people. In actual fact,
I was worried that I might well have offended you or others in my previous
post, and I had started to compose the following follow-up:

	Newsgroups: comp.lang.c++
	Subject: Re: New C++ type: boole
	References: <DOUGM.92Jul26151240@titan.cs.rice.edu>

	Firstly I think I should appologize for the tone of my previous article,
	which came out much more like a flame than I intended it to.
	I guess I wasn't really being very constructive. Sorry.

	dougm@titan.cs.rice.edu (Doug Moore) writes:
	....

Unfortunately the machine I was working on crashed (twice!) while I was writing
that, and I started something else.

--
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature VIRUS is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Newsgroups: comp.lang.c++
Newsgroups: comp.lang.c++

> 1.  What conventions do you like for naming private and protected data
>     members?  Why?
> 
> 2.  What naming conventions do you use for get/set functions?

I investigated this a couple of months ago and decided to go with the
following approach:

   class Example
   {
   public:
      void	num(int aNum) { theNum = aNum; }
      int	num() const { return theNum; }
   private:
      int	theNum;
   };

It's a little more verbose than underscores or single-letter prefixes,
but I like it pretty well.  Plus you don't have so many "gets" and "sets".


--Jeff Wright                  HP IC Business Division--Palo Alto
  wright@hpctgrd.hpl.hp.com               (HPtelnet/415) 857-5351
Newsgroups: comp.lang.c++
From: narayan@aravali.everest.tandem.com (Pankaj Narayan)
Subject: CLASS Libraries for SALE ???
Reply-To: narayan@aravali.everest.tandem.com (Pankaj Narayan)
Organization: Tandem Computers Inc., Cupertino CA
Date: Fri, 24 Jul 1992 22:48:32 GMT

Is there a place I can get either public-domain class libraries or else
for a small charge ? I'd like to get as extensive a set as possible, to see
what I can use.

Specifically, I would like to get classes for
- GUI's (I've heard of InterViews, never seen it)
- simple databases
- File manipulation on a Unix system

-- 
------------------------------------------------------------------------
Pankaj Narayan			Email: narayan_pankaj@tandem.com
Tandem Computers
From: johnb@searchtech.com (John Baldwin)
Newsgroups: comp.lang.c++
Subject: Refs to paper, how not to expose class implementation
Keywords: type opacity, abstract data typing, messages
Date: 22 Jul 92 23:03:29 GMT
Organization: Search Technology, Inc.


   Hello, netters!

      I referred to a certain paper recently and now I somehow cannot find
   it.  I don't remember the title nor the author --- just the content.
   Hopefully, someone here will recognize it and be able to provide me the
   reference.


   -------------------------------------------------------------------------
   SYNOPSIS OF ARTICLE:

      The general idea was that some classes, by their very nature, contain
   certain information which the user must know it contains.  But often these
   classes are implemented in such a way as to expose too much of their
   implementation.

      For example:


      class SomeType {
	 public:
	    .
	    .
	    bool     setStartTime(const Time& input);
	    bool     setEndTime(const Time& input);
	    .
	    .
	    bool     setSomeCondition( OtherType somevar );
	    .
	    .
	 private:
	    .
	    .
	    Time     startTime;
	    Time     endTime;
	    Foo      someCondition;
	    .
	    .
      };


      The proposed approach was to overload operator<< () and provide some
   additional typing to differentiate similarly-typed values.  So instead
   of writing:
	       myObj.setStartTime(begin);
	       myObj.setEndTime(finish);
	       myObj.setSomeCondition(neverOnSunday);

   ...which requires knowledge of the protocol of "set" methods for every
   class, one would write:

	       myObj << StartTime(begin);
	       myObj << EndTime(finish);
	       myObj << neverOnSunday;

   -------------------------------------------------------------------------


      Does the above synopsis sound like a paper you've read in the last
   year or so?  If so, please EMAIL to johnb@searchtech.com.  Please don't
   flood the net with responses or inquiries.  If there's sufficient
   interest, I'll post the reference if/when I get it.


   THANKS!



-- 
John Baldwin                                        johnb@searchtech.com
Search Technology, Inc.                             uupsi!srchtec!johnb
4725 Peachtree Corners Cir., Ste 200                johnb@srchtec.uucp
Norcross, Georgia  30092
Newsgroups: comp.lang.c++
From: hansen@pegasus.att.com (Tony L. Hansen)
Subject: Re: strdup() Was: Re: Renew?
Organization: AT&T
Date: Wed, 29 Jul 1992 15:52:52 GMT
Summary: nstrdup()

< From: steve@taumet.com (Steve Clamage)
<
< adk@Warren.MENTORG.COM (Ajay Kamdar) writes:
<
<< Given that new and malloc are not necessarily related, deleteing memory
<< returned from strdup() [STRINGS(3)] could be a recipe for disaster since
<< the returned memory is malloced and not newed. It is onerous to keep
<< track of which memory is newed, and which is malloced. C++ code written
<< using strdup() might work with one compiler but not with another if care
<< is not exercised in freeing the returned memory.
<<
<< Is there any move towards providing C++ified versions of functions like
<< strdup() as part of some standard library? Right now the only solution I
<< know is to implement my own version of such functions.
<
< Good analysis.
<
< The strdup() function is not part of Standard C, and is thus not being
< contemplated for Standard C++.
<
< Since strdup is so common, I don't know why it was not made part of
< Standard C.  Does anyone know whether it was dicussed by X3J11 and if so,
< why it was rejected?

If I remember correctly, it was in there for a while and then got removed in
a later draft. A number of implementations added the function to their
libaries during the time that the function was part of the draft standard.
Since it was such a useful function, it was usually left in. I don't
remember why it was removed from the draft standard.

< Since strdup is a very tiny function, your best bet is to write one
< yourself for use with C++, using new rather than malloc if you wish.
<
< You will run into problems with header files and library organization if
< you call it strdup, so probably you should pick a different name.

This is very important. If I make a call to strdup() I EXPECT it to have
been implemented using malloc() and I will use free() on the string later
on.

At least one library provider (Zinc) provides a version of strdup() which
uses new, but they named it something like nstrdup() or ui_nstrdup().
Nowadays, when writing C++ code that needs the functionality of strdup(),
I'll use my own version which uses new that I usually call nstrdup().

By the way, at least one person has posted a poor version of strdup() which
didn't check the return value of new. Here's my contribution. As you can
see, it is a very straightforward function:

    #include <string.h>
    char *nstrdup(const char *s)
    {
	if (!s) s = "";
	char *ret = new char[strlen(s) + 1];
	if (ret) strcpy(ret, s);
	return ret;
    }

					Tony Hansen
			    hansen@pegasus.att.com, tony@attmail.com
				att!pegasus!hansen, attmail!tony

Newsgroups: comp.lang.c++,comp.std.c++
From: jrobie@netmbx.netmbx.de (Jonathan Robie)
Subject: Re: run-time type checking (was: Re: Covariant Types in Derived Classes)
Organization: netmbx, Berlin, Germany
Date: Tue, 21 Jul 1992 13:53:36 GMT

shang@corp.mot.com (David (Lujun) Shang) writes:

>In article <1992Jul20.143900.23087@merlin.hgc.edu> jcm@hgc.edu (James McKim)  
>writes:
>> If I store a bunch of animals on the disk, I'm probably doing so
>> because I don't expect that I will need to access features specific
>> to a dog.

>I belive many OO database users are much more critical than you.
Absolutely!  If I store an object, then I expect that I can retrieve
that same object and have it act just exactly like the object that I
stored--it should have the same state and behavior.

After all, if I use polymorphy, then I am using the base class as an
interface to derived classes which may not even exist at the time I
design my interface.

Take the above statement and try to apply it to a CAD system:  If I
draw a bunch of shapes on the screen, I'm probably doing so because
I don't expect that I will need to draw things specific to a circle.
Is this really the way we want to approach polymorphy?


Jonathan

===========================================================================

Jonathan Robie		jrobie@netmbx.UUCP
Arnold-Zweig-Str. 44	jrobie@netmbx.in-berlin.de
O-1100 Berlin		
Deutschland		Phone:  +37 (2) 472 04 19  (Home, East Berlin)
				+49 (30) 342 30 66 (Work, West Berlin)


-- 
Jonathan

===========================================================================
From: ericg@ucschu.ucsc.edu (Eric Goodman)
Newsgroups: comp.lang.c++
Subject: Re: turbo c++ questions
Date: 21 Jul 92 16:40:19 GMT
Organization: UC Santa Cruz
NNTP-Posting-Host: hum15.ucsc.edu

In article <1992Jul13.143550.18700@esds.mdc.com> bonney@esds.mdc.com (Greg 
Bonney) writes:
> 1)  The only information I can find in the manuals about graphics is a
>     section in the tutorial on drawing lines and painting in the window.
>     I was expecting more.  How do I display a bit-mapped image, for
>     instance?  (I'm interested in writing games, ray-tracers, etc.)

Well, I just threw my TC++ 1.0 manuals in the trash, but my BC++ 2.0 
manuals talked about a bunch of C library routines for using bit images 
(getimage(), putimage() etc.).

Eric Goodman
Humanities Computing
UC Santa Cruz

ericg@hum.ucsc.edu  or  @ucschu.bitnet
Xref: sparky comp.lang.c++:11876 comp.object:3084
From: george@trwacs.fp.trw.com (George Fletcher)
Newsgroups: comp.lang.c++,comp.object
Subject: SUMMARY - C++ success stories
Keywords: C++
Date: 31 Jul 92 20:31:15 GMT
Followup-To: comp.lang.c++
Distribution: na
Organization: TRW Systems Division, Fairfax VA

Here is the summary of replies that I received in response to my request
for C++ success stories.  Thanks to all who responded.

This summary consists of a list of companies and the successful software
that was developed in C++.  The responses also contained a lot of good
information about the benefits of using an object oriented methodology
for developing software systems.  I am still in the process of putting
this information together.  If people are interested in the longer
summary I will post that when I get it completed.

Thanks again to all who responded.  I believed that the customer is
convinced that Object Oriented is the way to go; now we just have to
convince them to use C++.

George

P.S. I am still receiving responses and will continue to update the list.
I'll take all the leverage I can get :-)

========================== Short Summary ===================================

Company				Product/Description
-------				-------------------
CenterLine Software, Inc.	The new interfaces to CodeCenter and Object-
				Center are written in C++ using the OI
				toolkit.

Boeing				30 Million dollar imaging system
Boeing				REDARS - a distributed document retrieval
				system (200 workstations, 1.5 million images)

Mentor Graphics			VLSI CAD system.  This had two votes as a
				success and one vote as a failure.

GE Corp. R&D Center		80K LOC library that is used to build 
				applications with complicated user interfaces

Online Computer Systems		Grolier Multimedia Encyclopedia-Over 100K LOC.

SGI				CASEVision software development environment.
				~500K LOC and several thousand C++ classes

Intellection, Inc.		Rhythm (tm) - an intelligent factory
				planning and scheduling system

PRIME				configuration management system

Object Design, Inc.		ObjectStore - an OO DBMS, 250K LOC


-- 
==========================================================================
George Fletcher			UUCP:     uunet!trwacs!george
TRW Systems Division		Internet: george@trwacs.fp.trw.com
Fairfax Virginia
Newsgroups: comp.lang.c++
From: avenger@realsoon.WPI.EDU (Sam Pullara)
Subject: 128-bit math
Organization: Worcester Polytechnic Institute, Worcester, MA 01609-2280
Date: Tue, 28 Jul 1992 18:45:34 GMT


Has anyone implemented a quad precision library for C++?  How
difficult would something like this be?

--
/------------------------------------------------------------------------\
| Samuel J. Pullara                   / "      ---- ---    ---  .   .    |
| Worcester Polyinsta Technictute    -  o o    | /   .     |-| --- / \   |
| avenger@wpi.wpi.edu               /          |/          ---     ---   |
\_____________-All my opinions were expressed or implied.-_______________/
From: parag@netcom.com (Parag Patel)
Newsgroups: comp.lang.c++
Subject: Re: strdup() Was: Re: Renew?
Date: 28 Jul 92 21:43:30 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)

adk@Warren.MENTORG.COM (Ajay Kamdar) writes:

>Given that new and malloc are not necessarily related, deleteing memory
>returned from strdup() [STRINGS(3)] could be a recipe for disaster since the
>returned memory is malloced and not newed. It is onerous to keep track of
>which memory is newed, and which is malloced. C++ code written using strdup()
>might work with one compiler but not with another if care is not exercised
>in freeing the returned memory.

My partner and I always create and use a "strfree(const char*)" which is
just a simple inline function or macro that uses either malloc() or new
depending on how strdup() is coded.  We also allocate strings using
"strnew(int length)" (also a macro or inline) which merely allocates
space for a string of a given length plus one for the null byte.

Then it's an easy matter to switch from new/delete to free/malloc
without affecting any of our code.  The code is a bit more readable too,
and strnew() also eliminates the most common off-by-one error.


	-- Parag Patel <parag@Netcom.COM>
Newsgroups: comp.lang.c++
From: smneyln@ariel.lerc.nasa.gov (Michael Neylon)
Subject: PD pretty-printers?
News-Software: VAX/VMS VNEWS 1.41    
Organization: NASA Lewis Research Center
Date: 24 Jul 1992 12:45 EST  

Are there any C++ pretty-print packages out there that one could
format a file with?

TIA....

Mike Neylon          aka Masem the Great and Almighty Thermo GOD
  // Only the | Univ. of Toledo - Chemical Engineering - Senior
\X/   AMIGA!  |   NASA Lewis Research Center - Summer Intern
\_____________|_____smneyln@ariel.lerc.nasa.gov________________/
       -+ How do YOU spell 'potato'?  How about 'lousy'? +- 
      "Me and Spike are big Malcolm 10 supporters."-J.S.,PLCL
Newsgroups: comp.lang.c++
From: jimad@microsoft.com (Jim Adcock)
Subject: Re: reference to C++ assertion macro package?
Date: 27 Jul 92 19:13:36 GMT
Organization: Microsoft Corporation
Keywords: C++, assertions, precondition, postcondition, invariants

In article <1992Jul25.152611.18998@taumet.com> steve@taumet.com (Steve Clamage) writes:
|maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
|>	Does anyone have details of the proposed assertion
|>facility for C++?
|
|The <assert.h> facility from Standard C is part of C++.  I have not seen
|any proposals for anything else.  If in particular you mean something
|like the pre- and post-conditions for Eiffel classes, I haven't seen any
|discussion of them.

Overloading operator->() allows checking pre-conditions on pointers,
Overloading operator.() allows checking pre-conditions on references,
[if such were permitted] although neither with the convenience nor completeness
provided by Eiffel.
From: joe@Veritas.COM (Joe Fasano)
Newsgroups: comp.lang.c++
Subject: C++ yacc grammar
Summary: Does anyone know where I may get a yacc grammar for C++
Keywords: C++ yacc grammar
Date: 25 Jul 92 16:16:23 GMT
Distribution: comp.lang.c++
Organization: VERITAS Software

Where may I get a public domain C++ yacc grammar for
Version 2.1, or better yet 3.0.
Can I use yacc for templates ?

joe@veritas.com


-- 
	-------------------------------------------------------------
	joe			ARPAnet:  veritas!joe@apple.com
	joe@veritas.com		UUCPnet:  {apple,pyramid}!veritas!joe
From: reid@ss6.cps.msu.edu (Dr Richard J. Reid)
Newsgroups: comp.lang.c++
Subject: Re: Question: How to get fd from cin?
Date: 25 Jul 92 15:18:12 GMT
Organization: Department of Computer Science, Michigan State University

Shouldn't this be available as:

cin.fileno() ?

but no such mehod seems to be available with g++ or CC.

Dick
From: jimad@microsoft.com
Newsgroups: comp.lang.c++
Date: 17 Jul 92 22:44 MDT
Subject: Re: original [re-typed] text of overloa
Nf-ID: #R:1992Jul14.190540.2425@microsoft.:-712863988:1992Jul17.184411.13264@microsoft:-1805295543:001:916
Nf-From: microsoft.com!jimad    Jul 17 22:44:00 1992


In article <TMB.92Jul15095933@arolla.idiap.ch> tmb@idiap.ch writes:
|Funny. I have found overloading "operator?:" indeed "worthwhile" for
|implementing data-parallel array classes. I guess everybody has his
|pet operator...

Then I suggest that you or whoever write up a proposal for "your" 
"pet" operator, send it to the committee, and thereby garner your
share of the abuse.

When I wrote this up two years ago I did not say that I did not like
?:  I said that did not see a use for it.  I did see an important use
for operator.() -- namely operator.() is necessary if one is going to
write smart pointer, smart reference, smart array, reference counting 
classes etc, that are going to work correctly and safely.

I agree that your suggestion for operator:? is sensible and could be
useful, and if you write up a proposal for such an operator that makes
sense and is implementable I will support your proposal.
From: fedtmule@diku.dk (Jens Markussen)
Newsgroups: comp.lang.c++
Subject: MATRIX C++ library - anyone????
Date: 27 Jul 92 12:35:24 GMT
Organization: Department of Computer Science, U of Copenhagen

Some time ago, I posted a request on a C++ Matrix manipulation library
here, but didn't receive any replies. What I'm looking for is a simple
Matrix Class, with functions that will allow me to do basic matrix
manipulations (e.g. add, multiply, invert, transpose, calc. determinant).

There MUST be someone out there that knows of such a library....

Please help,,

Jens Markussen


fedtmule@diku.dk       DIKU = Department of computer science, Copenhagen.
Newsgroups: comp.lang.c++
From: sdm@cs.brown.edu (Scott Meyers)
Subject: Overloading and Function Pointers
Organization: Brown University Department of Computer Science
Date: Thu, 23 Jul 1992 21:05:17 GMT

When you take the address of an overloaded function name, C++ is supposed
to figure out which function to take the address of by looking at the type
information.  So consider this:

  class String {};
  String operator+(const String&, const String&);

  class Complex{};
  Complex operator+(const Complex&, const Complex&);

  template<class T> class Matrix {};
  template<class T> Matrix<T> operator+(const Matrix<T>&, const Matrix<T>&);

  typedef Matrix<int> (*PMIF)(const Matrix<int>&, const Matrix<int>&);

  void f()
  {
    String (*fp1)(const String&, const String&);
    fp1 = operator+;                          // must be op+ for Strings

    Complex (*fp2)(const Complex&, const Complex&) = operator+;
                                              // must be op+ for Complexes

    PMIF fp3 = operator+;                     // must be op+ for Matrix<int>s
  }

cfront copes with fp1 and fp2 without any difficulty, but for fp3 it says:

  error: cannot deduce type for &overloaded operator +()

Am I doing something wrong, or is this a compiler bug?

Thanks,

Scott

PS - When I feed this to g++, it generates an internal error and then
     expires.

-------------------------------------------------------------------------------
What do you say to a convicted felon in Providence?  "Hello, Mr. Mayor."