Linked by Eugenia Loli on Mon 10th Oct 2005 16:48 UTC, submitted by Shlomi Fish
General Development Shlomi Fish has written a new essay titled "When C is the Best? (Tool for the Job)". Its theme is giving several reasons (besides high speed and low memory consumption) why some code should still be written in C.
Thread beginning with comment 42786
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Re: More Blah
by stew on Mon 10th Oct 2005 21:19 UTC in reply to "RE[2]: Re: More Blah"
stew
Member since:
2005-07-06

> And how do you "make everything be big endian", exactly?

Have the compiler "correct" my bit-shifts and char* casts automatically on little-endian platforms. Having not to deal with machine-specific issues and not having to reinvent the wheel for string operations is the whole point of why one would want to use a high-level language instead of assembly.

I don't see how you can call a language "portable" in which the exact source code can returns different results on PPC and x86, even when compiled with the same compiler. And if you think endianess issues never happen, then you have never dealt with UTF16, raw PCM audio or bitmap data.

Reply Parent Score: 1

RE[4]: Re: More Blah
by corentin on Mon 10th Oct 2005 21:55 in reply to "RE[3]: Re: More Blah"
corentin Member since:
2005-08-08

> Have the compiler "correct" [...] char* casts automatically on little-endian platforms.

With pointer arithmetics from a parallel universe?

Reply Parent Score: 1

RE[5]: Re: More Blah
by stew on Mon 10th Oct 2005 22:29 in reply to "RE[4]: Re: More Blah"
stew Member since:
2005-07-06

>With pointer arithmetics from a parallel universe?

Nah, alien technology is sufficient.
When Basic, Java, PHP, Python etc allow me to byte-wise iterate through memory in big endian on a Pentium, why should C not allow me that?

Reply Parent Score: 1