www. O S N E W S .com
News Features Interviews
BlogContact Editorials
.
FreeBSD moves away from GCC, embraces Clang
By special contributor R_T_F_M on 2012-09-13 21:19:45
"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."
 Email a friend - Printer friendly - Related stories
.
Read Comments: 1-10 -- 11-20 -- 21-30 -- 31-40 -- 41-42
.
RE[5]: C++
By satsujinka on 2012-09-14 13:16:54
If I may remind you, I plainly stated that there is no risk of buffer overflows if you follow correct practices. At no point in time did I encourage unsafe practices. I spelled out for you exactly what must be done. And even with that in mind, it is not only simpler to do it my way but it also produces easier to read and understand code.

You've obviously found poor references for irony. There's simply no expectation that a C project would not be compiled with a compiler written in C++. Thus there cannot be any irony when it happens (and it happens all the time, further removing it from the realm of irony.)

Similarly, my participation is not ironic because there's no basis to expect that I wouldn't participate in correcting a misuse of an overly misused word.
Permalink - Score: 3
.
RE[2]: C++
By Valhalla on 2012-09-14 14:12:23
> I think people are slowly accepting that C++ eventually gets to replace C in most areas where C is still relevant in the desktop/server.
I seriously doubt that, not only from my own experience but also from what I've see of the language popularity benchmarks C is holding on as strong as ever (it recently beat Java for the top spot on Tiobe).

>
MacOS X device drivers are done in C++ (IOKit).

Actually it uses a subset of C++ with no exceptions, no templates, no multiple inheritance etc, which kind of begs the question why they couldn't just settle with plain C to begin with for those drivers.

C is here to stay, it's the lowest common denominator as far as high level languages go, supported by pretty much every platform, and useable from just about any other language.

That doesn't mean it's the best choice for every project, there are certainly areas in which other languages like C++, Java, C#, Python, Go, etc are likely better choices as they offer a higher level of abstraction.

A particular area in which I wager C will always reign supreme is in library/framework code, the reason projects like zlib, flac, libjpeg, png, sdl, audio/video codecs, lzma, etc etc are written in C is because it's A) fast and small memory footprint B) callable from just about anything.

Also none of the 'new' languages really compete with C, new languages like Go, Rust are higher level and compete primarily with C++ or even higher level languages.
Permalink - Score: 3
.
RE[7]: C++
By moondevil on 2012-09-14 14:16:51
> Conversely, Java lacking destructors and relying on cleanup functions being called explicitly in finally blocks fails to improve upon C++ as was the aim.

Since Java 7 you can make use of try-with-resources, which pretty much covers the RAAI scenarios.

> Overreliance on inheritance as a way of extending functionality is error-prone, and in Eclipse, for example, often requires looking at code of the superclass to make sure your extensions don't break it. That's extreme mystery action at a distance.

Blame the programmers, not the language.

I can also give examples of C++ frameworks, which rely on inheritance to death, coupled with nice touches of multiple inheritance.
Permalink - Score: 3
.
RE[3]: C++
By moondevil on 2012-09-14 14:20:23
> C is here to stay, it's the lowest common denominator as far as high level languages go, supported by pretty much every platform, and useable from just about any other language.

It is only the lowest common denominator on the operating systems that happen to have C as their API.

In Symbian you need a C++ compiler, even C code gets compiled by C++ compiler.

Starting with Windows 8, WinRT comes into the picture as the future direction of the operating system API.

Eventually C++ will be the lowest level API you can get on Windows.
Permalink - Score: 2
.
RE[8]: C++
By kwan_e on 2012-09-14 15:19:59
> > Conversely, Java lacking destructors and relying on cleanup functions being called explicitly in finally blocks fails to improve upon C++ as was the aim.

Since Java 7 you can make use of try-with-resources, which pretty much covers the RAAI scenarios.


You still need to make it explicit with a statement. RAII operates as soon as you acquire the resource. The benefit of C++ RAII is that it's automatic.

> > Overreliance on inheritance as a way of extending functionality is error-prone, and in Eclipse, for example, often requires looking at code of the superclass to make sure your extensions don't break it. That's extreme mystery action at a distance.

Blame the programmers, not the language.

I can also give examples of C++ frameworks, which rely on inheritance to death, coupled with nice touches of multiple inheritance.


But you're the one who brought up extreme mystery action at a distance, which only exists due to programmers, not the language. You also blamed the language for abuses of templates by programmers. You can't have one standard for criticizing one language and a different standard for another.

I'm blaming the language insofar as that at least C++ templates (I much prefer Ada generics I freely admit) provide a viable alternative. Java generics are tacky add ons.

Java the LANGUAGE itself has an overreliance on inheritance, so I don't need to blame the programmers. I would always encourage programmers to write in the way the language designers intended the language to be used (which is inheritance up the yin yang for OO dominant languages), even if the language is badly designed.
Permalink - Score: 2
.
RE[9]: C++
By moondevil on 2012-09-14 16:02:47
WTF are you smoking?!

Is your anger to Java, a tool, so big that you don't see to whom you're replying?!
Permalink - Score: 3
.
RE[10]: C++
By kwan_e on 2012-09-14 16:23:01
> WTF are you smoking?!

Is your anger to Java, a tool, so big that you don't see to whom you're replying?!


People make mistakes. However, remove that one errant paragraph and my points still stand.
Permalink - Score: 2
.
RE[9]: C++
By mightshade on 2012-09-14 16:57:07
> Java the LANGUAGE itself has an overreliance on inheritance
What do you mean? Can you elaborate on this a bit? *curious*
Permalink - Score: 2
.
RE[11]: C++
By moondevil on 2012-09-14 17:21:53
Ok.

I use Java as I use any other language, as tools depending on project requirements and what the customer asks for.

I will also take C++ over C, unless required to do otherwise.

As for inheritance abuse in Java, it is true that a lot of people do it, but you can also have quite nice arquitectures using interfaces instead.

Sadly, many developers don't know any better, and you tend to be forced to abuse inheritance as soon as you start incorporating a lot of 3rd party libraries.

In C++ you can find such examples in ATL, MFC, OWL and TurboVision and most game engines.
Permalink - Score: 3
.
Some CLANG vs GCC Benchamrks
By vermaden on 2012-09-14 19:15:59
http://lists.freebsd.org/piperma...
Permalink - Score: 3

Read Comments 1-10 -- 11-20 -- 21-30 -- 31-40 -- 41-42

There are 1 comment(s) below your current score threshold.

No new comments are allowed for stories older than 10 days.
This story is now archived.

.
News Features Interviews
BlogContact Editorials
.
WAP site - RSS feed
© OSNews LLC 1997-2007. All Rights Reserved.
The readers' comments are owned and a responsibility of whoever posted them.
Prefer the desktop version of OSNews?