"Chris Croughton" <chris@keristor.net> wrote in message
news:slrnd117k7.7fu.chris@ccserver.keris.net...[color=blue]
> On Sun, 13 Feb 2005 13:36:57 -0800, Walter[color=green]
> > the real reason that Java code is
> > portable is the language designers made a major effort to eliminate
> > implementation defined, undefined, and unspecified behavior.[/color]
> Hah! Try telling that to any of the Java programmers I know.[/color]
Java has a design goal of 100% portability, but in reality falls a bit short
of that. But it is far more portable than C is.
[color=blue][color=green]
> > Much of the implementation defined, etc., behaviors of C are legacies[/color][/color]
left[color=blue][color=green]
> > over from how early implementations differed. Some of it is from trying[/color][/color]
to[color=blue][color=green]
> > improve efficiency on some CPUs, such as whether char's are signed or[/color][/color]
not.[color=blue][color=green]
> > Portability of C code is achieved by carefully avoiding such things, and[/color][/color]
one[color=blue][color=green]
> > really has to know C well to do it successfully.[/color]
> The signedness of char is one of the biggest mistakes in the language.[/color]
If that's its biggest mistake, than C is truly remarkable <g>. Myself, I
think C's biggest mistake is using #include instead of import.
[color=blue]
> They should have been defined as unsigned from the start (there's no
> reason something that small needs to be signed) and avoided all of the
> hassles with extended character sets (and EBCDIC).[/color]
I agree that now it should be unsigned (and that is what D does). But early
C had to run on machines where it did make a significant performance
difference.
[color=blue][color=green]
> > The D programming language falls somewhere in between C and Java on this
> > issue. It tries to eliminate as many of these non-portable behaviors as
> > possible without significantly affecting power or performance. (One that
> > can't be eliminated is the size in bytes of a pointer, sigh.)[/color]
> But is there an agreed specification?[/color]
Is there an ISO, ANSI, or ECMA standard specification? No. The specification
is at
www.digitalmars.com/d/. Whether you agree with it or not is up to you
<g>. In the future, there will surely be a standards body doing a standard
for it.
[color=blue]
> Are there compilers for all platforms?[/color]
All? No. But there are compilers for Win32, Linux, Mac OS X, FreeBSD, and
Cygwin. Since it's been integrated with gcc, a compiler for any platform
that gcc supports is within reach of any interested party.
-Walter
www.digitalmars.com C, C++, D compilers
"code of the nerds"