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



spinoza1111 said:

On Dec 31, 5:26 pm, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
spinoza1111 said:

On Dec 31, 12:46 am, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:

<snip>

Well, ASCII is of course 7 bits, so it isn't even a coincidence. But
it

No, dear Richard, it is 8 bits.
It WAS 7 bits many years ago

ASCII is defined as a 7-bit code in ANSI X3.4-1986. If ANSI have changed
the definition of ASCII since 1986, they will have published the fact in
a revised Standard, in which case you will be able to cite that
Standard. Feel free to try.

Get real. It's a 7 bit code

Correct. I said it was a 7-bit code, and you contradicted me. You now
appear to accept that your contradiction was incorrect.

embed universally in 8 bits,

Incorrect. For example, Unicode embeds it in 16 bits. (See the entry for
"ASCII" at http://www.unicode.org/glossary/

and the fact that it fits in 7 bits

....means that your claim that it is an 8-bit code is incorrect.

<snip>

And, C code using char * to represent strings is NOT PORTABLE,

Your confusion over C strings is well-documented. It is evident that
this confusion remains. For my counter-arguments, please consult the
archives. I'm not going to explain the blindingly obvious to you all
over again, when I've already done so at great length.

We're not going to consult the archives.

Of course not - after all, they prove my point, and you wouldn't want that,
would you?

You haven't once argued
coherently as to why your favorite (possibly only) language is
"really" portable right here in comp.programming

Well, I have, but you seem to want to hold (and lose) the debate all over
again. I'll save you some time, by referring you to the (many) replies I
made some years ago.

which is where the
discussion can be conducted for all to see.

It already has been, and the archive is available for all to see.

Instead, you've engaged in character assassination

No, you've engaged in character suicide, and you need no help from me.

by citing sources which you know most people will not consult,

No, you *hope* most people will not consult them, so that you can put
forward the same broken arguments again. Well, I'm not playing.

which is a Fascist strategy, as I said in 2003.

If you want people to treat you seriously, why not try refraining from
making risible claims?

Look, mate. C isn't portable, because Brian Kernighan is an honest
man, and he says in a book published this year that Rob Pike's code is
C. But when I put this into the .Net development environment's C++
compiler, char * becomes sbyte and has to be converted byte by byte to
work with a test harness that uses the String. C is PART of C++, so
you are wrong in your claims that C is portable.

Your thinking is just bizarre. Firstly, C++ has no sbyte type. Secondly,
although C and C++ share a large common subset, C is certainly not a part
of C++ in the sense of being a proper subset thereof - it is trivial to
construct legal (and good) C programs that are not C++ programs. Thirdly,
even if C were a part of C++ (which it is not, although they share a large
common subset), that would not mean that C is not portable.

A language is portable when it can be ported, without a line by line
audit for conversions, for example to bit, which think they know the
length of the type.

A programming language is maximally portable when programs written in it
can be run without modification on any computer, possibly after a
recompilation. (Because computers are not guaranteed to be compatible with
each other at the machine code level and very often are not, it is
necessary for any portable programming language to be implemented on the
computer, which means that either a compiler or a runtime environment must
be made available on that computer. In C's case, typically it is a
compiler that is provided, so recompilation is required.)

C, more than any other language, has a strong claim to maximal portability,
although of course some very tiny embedded systems do not provide the
standard C function library (and neither are they required to by ISO/IEC
9899 - they are given a special dispensation in recognition of their small
size and possibly limited functionality), but I don't think there's any
significant hosted environment in existence for which no implementation
exists that conforms to ISO/IEC 9899:1990. If I'm correct in that, then C
is about as portable as any language can get. If C is not portable,
nothing is.

Portable code can with great difficulty written in C,

The difficulty is greater for some than for others. I can see why you might
have reached the conclusion that your C programs are not portable, but not
everybody uses C in quite the way you do.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.



Relevant Pages

  • Re: "Foreign" programmers thoughts on American politics?
    ... of course C programs can be written in such a way as to make portability ... just as in any other language. ... hit a culture not only of competence but in some cases real expertise, ...
    (comp.programming)
  • Re: fread/fwrite
    ... i write a X language program; ... in the standard C language ... _can_ achieve a very high level of source code portability. ...
    (comp.lang.c)
  • Re: C, really portable?
    ... > Wait, is Java a modern language superior to C, or is it still ... It is a much better OO language than C++, ... It depends what you are doing, Java aims for rigorous portability - the same ... regardless of platform. ...
    (comp.lang.c)
  • Re: code portability
    ... There is a tension between efficiency and portability. ... I rarely find it useful to assume ASCII. ... A Ring is a set with a 0, a + operator and a * operator. ... If you understood unsigned integers in C you would understand that it applies whatever the signed representation is. ...
    (comp.lang.c)
  • Re: "Foreign" programmers thoughts on American politics?
    ... of course C programs can be written in such a way as to make portability ... just as in any other language. ... computer science and the general culture an ignorance which is you now ... hit a culture not only of competence but in some cases real expertise, ...
    (comp.programming)