Linked by Eugenia Loli on Mon 10th Oct 2005 16:48 UTC, submitted by Shlomi Fish
Thread beginning with comment 42707
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
As long as you are on a "c machine" and since Lisp machines seem to have dissappeared (physically speaking), I think you can be pretty sure you'll be on a "c machine."
Good Lisp implementations have existed for both Lisp machines and C machines. Good C implementations have never existed for a Lisp machine. What does that say about C's vaunted portability? You're basically saying: C is portable as long as you only try to port it to machines designed for C. Duh. Does that mean it is portable, or does that merely mean that it's so popular that most machines are designed for it?
RE[3]: C and portability
by rayiner on Mon 10th Oct 2005 22:30
in reply to "RE[2]: C and portability"




Member since:
2005-06-29
C code should function the same on different architectures if you mind your types...
It's only when you get into things that aren't really within c's logic you get into trouble: Using ints as pointers, using shift operators, and writing asm sections.
As long as you are on a "c machine" and since Lisp machines seem to have dissappeared (physically speaking), I think you can be pretty sure you'll be on a "c machine."
Developers are conservative because they don't like menial tasks like porting that c code to the latest fad language. It's not perfection you need in a language, it's having it still be there in 10 years that you need. (Not to mention all the other important stuff, like not sucking so bad you can't do anything in it).
I'd say that code written in a portable language is portable.... It sort of "inherits" its portability from the portability of the compiler/runtime/machine. The trouble is that a lot of c code is written with a specific machine in mind, and that machine wasn't the c machine it was say Intel x86. So they did nice things like assuming sizeof *int == sizeof *(char *). Or assuming that int x = 1; x = x >> 48 would equal x >> 16.