Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <03n678-uc8.ln1@wilbur.25thandClement.com> (permalink) |
|---|---|
| From | William Ahern <william@wilbur.25thandClement.com> |
| Subject | Re: Is char obsolete? |
| Newsgroups | comp.lang.c |
| References | <inn180$1e3$1@oravannahka.helsinki.fi> <innf6e$5v5$1@oravannahka.helsinki.fi> <bUJnp.3444$Y71.2284@newsfe17.ams2> <p6d478-egg.ln1@wilbur.25thandClement.com> <inpqbv$tqe$1@oravannahka.helsinki.fi> |
| Date | 2011-04-09 12:02 -0700 |
Lauri Alanko <la@iki.fi> wrote: > In article <p6d478-egg.ln1@wilbur.25thandClement.com>, > William Ahern <william@wilbur.25thandClement.com> wrote: > > All wider types do is obscure the problem. The OP should sit down with a > > book on Unicode and learn the difference between abstract characters, > > combining characters, code points, graphemes, grapheme clusters, > > etc. > The OP is familiar with Unicode, thank you very much. > I happen to agree with you that the entire concept of "character" is > bogus, and there are quite a number of reasonable ways to decompose a > string. > But my original point was that char is useless. You are retorting by > saying that wchar_t is also useless. That may be, but I don't see how > that is any kind of a defense for char. Fair enough. I was partly responding to your later suggestion of a struct object. But if your replacement of char doesn't actually do anything substantive except appease your sensibilities, what's the point? Something like int8_t could only ever be a typedef to char anyhow, given that char is the fundamental unit of memory. (If char was more than 8 bits it'd have to be int8_least_t.) Your argument seemed to be predicated on an unspecified, superior alternative. The fact that you can't articulate it should be a hint that there likely is no satisfactory alternative. > > Perl 6 comes the closest, AFAIU, to addressing the complexity of Unicode by > > inventing it's own normalization form, "NFG". At runtime it builds a > > "grapheme table" mapping new code points to irreducible sets of Unicode code > > points so that strings can be indexed with sensible results. > How does it handle XML, then, since the meaning of an XML document can > be changed during normalization? The same way any other processor does (or doesn't), I suppose. It wouldn't be unique in this regard, nor AFAIU is the issue limited to encoding representation (e.g. whitespace and presence or absence of character entities can change the "meaning" of a document, if by meaning we consider what the producer and consumer expect above and beyond what XML can narrowly guarantee). I ran across this while Googling: I was walking across a bridge one day, and I saw a man standing on the edge, about to jump off. So I ran over and said, "Stop! Don't do it!" "I can't help it," he cried. "I've lost my will to live." "What do you do for a living?" I asked. He said, "I create web services specifications." "Me too!" I said. "Do you use REST web services or SOAP web services?" He said, "REST web services." "Me too!" I said. "Do you use text-based XML or binary XML?" He said, "Text-based XML." "Me too!" I said. "Do you use XML 1.0 or XML 1.1?" He said, "XML 1.0." "Me too!" I said. "Do you use UTF-8 or UTF-16?" He said, "UTF-8." "Me too!" I said. "Do you use Unicode Normalization Form C or Unicode Normalization Form KC?" He said, "Unicode Normalization Form KC." "Die, heretic scum!" I shouted, and I pushed him over the edge. -- http://diveintomark.org/archives/2004/07/06/nfc
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is char obsolete? Lauri Alanko <la@iki.fi> - 2011-04-08 13:06 +0000
Re: Is char obsolete? Chris H <chris@phaedsys.org> - 2011-04-08 14:55 +0100
Re: Is char obsolete? Thomas Richter <thor@math.tu-berlin.de> - 2011-04-08 17:04 +0200
Re: Is char obsolete? Chris H <chris@phaedsys.org> - 2011-04-08 16:32 +0100
Re: Is char obsolete? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-08 17:02 +0100
Re: Is char obsolete? Thomas Richter <thor@math.tu-berlin.de> - 2011-04-09 21:57 +0200
Re: Is char obsolete? James Kuyper <jameskuyper@verizon.net> - 2011-04-09 16:47 -0400
Re: Is char obsolete? William Ahern <william@wilbur.25thandClement.com> - 2011-04-09 15:10 -0700
Re: Is char obsolete? James Kuyper <jameskuyper@verizon.net> - 2011-04-09 18:44 -0400
Re: Is char obsolete? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-08 16:13 +0100
Re: Is char obsolete? Keith Thompson <kst-u@mib.org> - 2011-04-08 12:55 -0700
Re: Is char obsolete? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-08 22:16 +0100
Re: Is char obsolete? Lauri Alanko <la@iki.fi> - 2011-04-08 17:04 +0000
Re: Is char obsolete? Nobody <nobody@nowhere.com> - 2011-04-08 20:10 +0100
Re: Is char obsolete? "robertwessel2@yahoo.com" <robertwessel2@yahoo.com> - 2011-04-08 15:43 -0700
Re: Is char obsolete? Nobody <nobody@nowhere.com> - 2011-04-09 22:44 +0100
Re: Is char obsolete? "BartC" <bc@freeuk.com> - 2011-04-08 21:04 +0100
Re: Is char obsolete? William Ahern <william@wilbur.25thandClement.com> - 2011-04-08 15:01 -0700
Re: Is char obsolete? Lauri Alanko <la@iki.fi> - 2011-04-09 14:27 +0000
Re: Is char obsolete? "BartC" <bc@freeuk.com> - 2011-04-09 19:14 +0100
Re: Is char obsolete? William Ahern <william@wilbur.25thandClement.com> - 2011-04-09 12:02 -0700
Re: Is char obsolete? Ian Collins <ian-news@hotmail.com> - 2011-04-09 09:40 +1200
Re: Is char obsolete? Florian Weimer <fw@deneb.enyo.de> - 2011-04-08 23:07 +0200
csiph-web