Re: Brian Kernighan, maybe I'm not worthy, maybe I'm scum




"spinoza1111" <spinoza1111@xxxxxxxxx> wrote in message
You have told me, for example, that C is fully aware of international
strings. But when I try to re-use this code in .Net, it can't be
called directly from C Sharp using a String object, because its
interface appears in C Sharp as consisting of sbyte arrays. I fear
that there is no way of converting sbyte arrays to and from two-byte
wide character arrays without an extra loop...although there "might"
be a single Pentium instruction to do so.

The identity of char and byte, with hindsight, was a mistake.
However it has the good effect that it encourages the use of ASCII, which is the one de facto universal standard for data representation. Non-English languages can be build on top of ASCII, as has happened successfully with HTML. Non-ASCII representations certainly exist, but they risk being unreadable on some platforms, and in fact they all have weaknesses which make them undesireable as replacements for ASCII.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm




.



Relevant Pages

  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... called directly from C Sharp using a String object, ... interface appears in C Sharp as consisting of sbyte arrays. ... Well, sure, if the platform programmers cut snippets from Beautiful ...
    (comp.programming)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... Malcolm McLean said: ... called directly from C Sharp using a String object, ... interface appears in C Sharp as consisting of sbyte arrays. ... ASCII unaccountably lacks the c-acute character which is ...
    (comp.programming)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... interface appears in C Sharp as consisting of sbyte arrays. ... and ASCII today use 8 bits. ... ASCII unaccountably lacks the c-acute character which is ... modern strings on .Net use two bytes consistently? ...
    (comp.programming)
  • Re: Look what i made!
    ... than the rest..and very sharp. ... Oh okay thanks for the explanation on the ASCII ... Bit of a thread jack, have you done one of the nuts up too tight so the ...
    (rec.sport.unicycling)