Linked by R_T_F_M on Thu 13th Sep 2012 21:19 UTC
FreeBSD "For the past several years we've been working towards migrating from GCC to Clang/LLVM as our default compiler. We intend to ship FreeBSD 10.0 with Clang as the default compiler on i386 and amd64 platforms. To this end, we will make WITH_CLANG_IS_CC the default on i386 and amd64 platforms on November 4th."
Thread beginning with comment 535403
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[10]: C++
by boldingd on Mon 17th Sep 2012 08:19 UTC in reply to "RE[9]: C++"
boldingd
Member since:
2009-02-19

You keep avoiding to answer how you would use C linkage if the operating system would no longer offer it.


OK, here: modern Linux doesn't even strictly use C calling and linkage. The reason that C is used as the linking standard at the seams of some multi-language projects is that C is the lowest-common denominator between different function call models. C-style calling and linking is extremely simple; it can be mapped onto the actual calling-and-linking in use on any platform, and for almost any language, there is a subset of that language that can be mapped onto C calling conventions.

Using COM for object interchange and leaving the rest up to the compiler is compute until you want to link in a module written in a non-OOP language or compiled by a different compiler suite. Then you're back to a C-style interface and C calling conventions. Not because it's the platform's normal calling and linking conventions, but because it's a patch of common ground between the function-call models used in different compiled languages.

Which isn't even to say that all multi-language projects will just do everything as extern C and call it a day; for some languages and platforms, other techniques (like COM interchange) will be better. But C as the basic, universal model of calling a function will never go away completely, and your eager and self-assured predictions of C's decline and demise in the coming years are comically premature.

No, the UNIX authors did not like the other system programming languages. Algol 68 and PL/I were two that could have been used.

There were operating systems already written in those languages, so I doubt that they really sucked.

But I was not there, so my conclusion might be completely false.


Yeah, I'm going to stick with Thompson and Richie's contemporary assessment of the available languages, especially given that Richie was dissatisfied enough with his existing alternatives to create a whole new language.

Also, C had plenty of its own selling-points. I've written C and FORTRAN, and I can tell you which I'd rather use for a new project. C was quicker and cleaner than anything it was competing against, and its portability was another major asset (FORTRAN compilers had a tendency to have syntax and operators specific to the platform they where designed for).

I don't know why Algol and PL/I never gained traction. I've only heard PL/I mentioned as a historical footnote, but I don't know how it stacked up against it's contemporaries. As for Algol, bear in mind that it had already been released and largely failed in the market (yes it was used, yes it was still around, no, it had not displaced FORTRAN) when C got out into the wild in the late 70's.

NB that I am just under 30 and was not around for any of the above. I just payed attention in Programming Languages. ^.^

Reply Parent Score: 2

RE[11]: C++
by moondevil on Mon 17th Sep 2012 10:36 in reply to "RE[10]: C++"
moondevil Member since:
2005-07-08

But C as the basic, universal model of calling a function will never go away completely, and your eager and self-assured predictions of C's decline and demise in the coming years are comically premature.


It might take a few generations still, but I am confident that with the change to more strongly typed languages, this will eventually happen. Even C++ has a stronger type safety than C.

Just out of curiosity, yesterday I was reading some OS/400 documentation, nowadays known as z/OS. And discovered that everything in the OS gets compiled to bytecode and JITted on installation, similar to what .NET does.

In this mainframe OS, the only calling convention is bytecode based, there is no C calling convention.

Anyway, maybe I am plain wrong about C's future, and my bias against it is from a frustrated Turbo Pascal guy,that has seen enough core dumps and pointer tricks gone wrong in his life.

Who knows what the future reserves.

NB that I am just under 30 and was not around for any of the above. I just payed attention in Programming Languages. ^.^


36 here, and started using computers back in 86 at the age of 10.

I was lucky that my university department had lots of literature of the early computing days, and I also took all compiler development and system programming classes. So it was quite nice to experience so much from the computing history.

Sadly I think the younger generation that start nowadays learning about computers will miss quite a few things.

Reply Parent Score: 2

RE[12]: C++
by boldingd on Mon 17th Sep 2012 23:00 in reply to "RE[11]: C++"
boldingd Member since:
2009-02-19

36 here, and started using computers back in 86 at the age of 10.

I was lucky that my university department had lots of literature of the early computing days, and I also took all compiler development and system programming classes. So it was quite nice to experience so much from the computing history.

Sadly I think the younger generation that start nowadays learning about computers will miss quite a few things.


On this, you and I are in complete agreement. I'm teaching some of them, and while there are a few bright spots, on the whole, I'm pretty worried.

Reply Parent Score: 2