What's C's biggest mistake?
Walter Bright
newshound1 at digitalmars.com
Thu Dec 31 18:48:36 PST 2009
dsimcha wrote:
> I personally am a scientist (bioinformatics specifically) and I think having basic
> complexity management in your code is worthwhile even at fairly small project
> sizes. I learned this the hard way. For anything over about 100 lines I want
> some modularity (classes/structs, higher order functions, arrays that are more
> than a pointer + a convention, etc.) so that I can tweak my scientific app easily.
> Furthermore, multithreading is absolutely essential for some of the stuff I do,
> since it's embarrassingly parallel, and is a huge PITA in C.
When I was working on converting Optlink to C, I thought long and hard
about why C instead of D. The only, and I mean only, reason to do it via
C was because part of the build process for Optlink used old tools that
did not recognize newer features of the OMF that D outputs.
Once it is all in C, the old build system can be dispensed with, and
then it can be easily converted to D.
If you want to, you can literally write code in D that is line-for-line
nearly identical to C, and it will compile to the same code, and will
perform the same.
You can do the same with C++ - Linus surely knows this, but I suspect he
didn't want to use C++ because sure as shinola, members of his dev team
would start using operator overloading, virtual base classes, etc.
More information about the Digitalmars-d
mailing list