home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11798 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.2 KB

  1. Path: sparky!uunet!olivea!news.bbn.com!usc!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!bs
  2. From: bs@alice.att.com (Bjarne Stroustrup)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: New C++ type: boole
  5. Summary: w_char is a real type
  6. Message-ID: <23357@alice.att.com>
  7. Date: 30 Jul 92 13:07:06 GMT
  8. References: <DOUGM.92Jul26151240@titan.cs.rice.edu> <1992Jul29.195155.15634@microsoft.com>
  9. Organization: AT&T Bell Laboratories, Murray Hill NJ
  10. Lines: 20
  11.  
  12.  
  13.  
  14. jimad@microsoft.com (Jim Adcock @ Microsoft Corporation) writes
  15.  
  16.  > A similar, and more important problem [IMHO] occurs because w_char is not
  17.  > a separate type:
  18.  >
  19.  >    w_char chSqrt = '\x221A';
  20.  >
  21.  >  cout << chSqrt;
  22.  >
  23.  > doesn't cause the Unicode square root sign to be printed out, but rather
  24.  > some decimal integer.
  25.  
  26. At the Toronto meeting of ANSI-X3J16/ISO-WG21 meeting w_char was voted a separate
  27. type. This is of course an incompatibility with C, but it was decided that the
  28. benefits (in C++) of having w_char a real type so that the overloading mechanism
  29. works for it outweighed the incompatibility problems. This decision closely matches
  30. the decision to give character literals, such as 'a', the (obvious) type char rather
  31. than int. Naturally, L'a' is of type w_char.
  32.