delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/31/06:50:09

From: lhall AT rfk DOT com (Larry Hall)
Subject: RE: <string.h> .vs. <String.h>
31 Jan 1997 06:50:09 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <2.2.32.19970131140128.009207b0.cygnus.gnu-win32@ma.ultranet.com>
Mime-Version: 1.0
X-Sender: lhall AT ma DOT ultranet DOT com
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Original-To: dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de, shankar AT chromatic DOT com
Original-Cc: gnu-win32 AT cygnus DOT com, dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de
Original-Sender: owner-gnu-win32 AT cygnus DOT com

At 03:42 AM 1/31/97 EST, dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de wrote:
>Hi, you wrote:
>
>: Technically, the ANSI C++ committee is off the hook, because they have
>: mandated that C++ include files be included simply as <String>,
>: <iostream>, etc., and so it should be possible to distinguish between
>: <String> and <string.h>.
>
>I have never heard about the .h-less includes!
>

Neither had I but looking at the code, they're in there!  See g++/complex.h.

>: In practice, however, 100% of all C++ installations still ship their
>: files using a .h suffix, and we have a clash. Remember that ANSI C++
>: still grandfathers in the <string.h> file from C, so we have a situation
>: in which C++ implementations have to ship both files, and given the
>: case-insensitive nature of many file systems, they have a problem on
>: their hands.
>
>Would it be possible having *identical* contents for both, depending
>on _CPLUSPLUS or some such, protected from multiple includes by the same
>ifdef, or both just including another, third file with a secure name?

I like the idea of using _CPLUSPLUS and sharing the multiple include symbol 
or using both in one file (if two different ones already exist).  This would
allow one to use the "traditional" file names for things like "string.h" for
backward compatibility and ease of use in C while allowing the addition of 
C++ code without creating the case-insenstive file name problems or needing 
to dream up yet another reasonable file name for the String class.

Larry Hall                                                      lhall AT rfk DOT com
RFK Partners, Inc.                      (617) 239-1053
8 Grove Street                          (617) 239-1655 - FAX
Wellesley, MA  02181                             

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019