Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,795 of 33,346    |
|    Miles Bader to Martin B.    |
|    Re: unicode and string    |
|    15 Jan 12 05:13:25    |
   
   From: miles@gnu.org   
      
   "Martin B." <0xCDCDCDCD@gmx.at> writes:   
   > Personally I feel it was a *very* bad decision not to have a distinct   
   > UTF-8 character (literal) type. (I mean, we have char16_t and char32_t,   
   > why the hell not char8_t and be done with it!)   
      
   Presumably the issue is that in sane (non-MS) implementations, utf-8   
   literals work perfectly well with existing char-based infrastructure,   
   and an increasingly large number of interfaces simply assume all char*   
   strings are encoded using utf-8, and they didn't want the giant ball   
   of hair that would come with a really distinct type.   
      
   [Granted, MS-style wide-strings result in a similar giant ball of hair   
   ("hey, can you duplicate all yer interfaces and datatypes, only with   
   wchar_t? ... hey, now how about with char16_t? ... er, hey, .."), but   
   if anything that serves as a _warning_...]   
      
   Maybe they could have had some sort of automatic promotion   
   (automagically converting char8_t* to char*t) and made it all work   
   out, I dunno, but given the widespread use of utf-8 in char* strings   
   and the potential for snowballing complexity, this may be the most   
   practical route-of-least-effort.   
      
   -Miles   
      
   --   
   Come now, if we were really planning to harm you, would we be waiting here,   
   beside the path, in the very darkest part of the forest?   
      
      
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca