Intel Software Development Products for OSX
rgraham writes "Intel has released a number of development tools for OSX, including a C++ and Fortran compiler. I for one would be interested to see some benchmarks of code compiled using these tools and Apple's own Xcode."
Apple uses GCC behind Xcode, so just look for the already-existing comparions of GCC against Intel's compilers.
Fortan is big in the modeling world, still. Oddly enough for a language that is that old, gives clout in science and engineering worlds.
The C++ is nice but since most osx programs are written on objective c, probably of little use.
Those math libraries look like the ticket though. Everone likes highly optimized math libraries.
I wonder if this is the main reason why OS X is so much faster on the Intel chip. I can see the Powerbook getting a good speedboost but 4-5x is a lot more than what you'd expect.
>Its a shame that most of the new OS X dev work is done using Objective-C and not C++
why is this a shame? They're using a language that actually makes sense, rather than one that's just a bunch of ideas cobbled together on top of C, and you think this is a shame? or is it just that you didn't have an Objective C class when you went to devry*, so you don't know anything about it?
Yes, Intel's compiler is faster on intel hardware than gcc. this is true in every os that runs on intel hardware... but makes almost no difference in the real world, except for processor intensive apps ( mp3 ripping, dvd encoding, etc ). so, for 99 % of the code written for any os, it just makes more sense to use a portable compiler, and a good language.
* before you flame me on this, they didn't have an objective c class when I went there either. It's not that you suck, just that devry does.
Sitting Walrus Blog
Its a shame that most of the new OS X dev work is done using Objective-C and not C++.
I don't know that it would be a shame.
Certainly, if C++ were the language of choice for Cocoa, it might make C++ users feel more encouraged to target Cocoa, but it wouldn't actually help them write code for Cocoa.
The C++ interfaces for different display and widget systems are as different as the systems themselves- QT uses a "moc" C++ compiler that isn't even really C++ for signals and slots support- but encourages programmers to avoid tampering with the event loop, while Win32 encourages direct access with it.
So maybe if "Cocoa++" were around, it might help QT programmers (as the "moc C++" was designed to add features that Objective-C has, but that C++ didn't (and still doesn't well...)), but it certainly wouldn't help Win32 programmers in the slightest- except in "feeling" like all they've got to learn is a new API instead of a new language.
However, it may be better to point out that unlike the vast gap between C and C++ that makes them so distinctly different languages, Objective-C is a strict superset of C, in the sense that all C code is also Objective-C code. Apple also provides Objective-C++ which is a strict superset of C++, in the sense that all C++ code is also Objective-C++ code.
Now, most proficient programmers have no problem picking up a new language in a matter of hours; and Objective-C is so completely straightforward that just diving in is bound to validate that.
However, there are less-proficient programmers, and they tend to produce, sub-standard quality software. Given how much Cocoa software is of such high quality, it does beg the question: Is it the lack of poor programmers working in Objective-C, or is it that Objective-C is just that wonderful to use?
Having a "Cocoa++" might answer that question definitively, but I simply cannot see how that would be a Good Thing.
Yeah, Ok, forget the whole language A -vs language B war:
// .. fill data here ...
// .. fill data here ...
...
...
// ... potentially way more ...
C++ is better here:
vector va, vb, vc;
vector vd;
vd = va * vb + vc;
vs Objective-C:
FloatVector * va, vb, vc;
IntVector * vd;
[vd autorelease];
vd = [IntVector vectorWithFloatVector:[[va multiplyFloatVec:vb] addFloatVec:vc]];
Objective-C (err Cocoa) is better here:
id someObj, someString =
if([someObj respondsToSelector:@selector(stringValue)])
someString = [someObj stringValue];
vs C++:
BaseClass * someObj =
string someString;
if(HigherClass * hc = dynamic_cast(someObj))
someString = hc->stringValue();
else if(OtherHigherClass * hc = dynamic_cast(someObj))
someString = hc->stringValue();
These are only two examples off of the top of my head, but clearly, comparing languages without specifying domain is pointless, because I can come up with tons of examples where one is better than another. Hell I can even make VB look good if I limit myself to one of it's strengths, and avoid it's weaknesses.
I love Objective-C, I also love C++. I choose the more appropriate for the task.
Oh, you also have process creation and message passing primitives in the language, allowing you to easily write very scalable code.
I am TheRaven on Soylent News
GNUstep may not be anywhere nearly as mature as Qt or Gtk, but it's hardly a non-starter.
English is easier said than done.
It's been a while since I coded in Objective-C, but last time I did, it didn't appear to implement C99 standards...
Probably since before 1999, or at least before C99 support was added.
int main() {
for (int i = 0; i < 99; ++i);
return 0;
}
Compiled just fine with: gcc -std=c99 -o moo moo.m
That was ALWAYS true. "class" was always a C++ keyword, and not a C keyword.
...;
That's the point. C++ is not compatible with C, whereas Objective-C IS compatible with C.
It's not like trying to get a C programmer to write C++ (something that's very difficult), because Objective-C isn't anywhere near as complicated as C++ and yet does it so much better.
It's just not very interesting because it's trivial to resolve such incompatibilities -- unless your compiler is really, really good at reporting deceptive error messages, I guess.
So what? The question is not whether a capable C++ programmer can dive into C code, but instead what the barrier is with C++ programmers and Objective-C.
I pointed out that Objective-C is a strict superset of C, and Objective-C++ is a strict superset of C++. That means that if the programmer feels much more comfortable expressing certain logic in C or C++, they are able to when using Objective-C/C++.
This however, isn't true in the other direction- C users aren't always able to express C-think logic in C++.
Something like this:
const int *a;
float *b, z;
z =
b = &z;
a = (const int *)b;
Not valid C++ at all, no in C++ you need:
a = const_cast<const int *>(b);
This isn't surprising, or even new: C++ is not C. It's not a "better C", or a "newer C", it's got about as much in common with C as Java does.
But Objective-C is C, and Objective-C++ is C++.
Fine: C++ is your favorite language. You might even find it a fine language. That's okay, and I'm not making any effort to dispute that, or convert you or anyone else.
The question is: why do C++ users think the barrier into Objective-C is so high? Is it because they secretly realize they don't know C?
Well what about the barrier into Objective-C++?
Thats a poor test. This particular feature has been with C++ for a while and most C vendors are also C++ vendors. All they had to do is copy it across to C. A good test whould be a C feature which is _NOT_ a C++ feature.
BTW: The place where most so called C99 compiler fail are variant arrays - A feature even ALGOL 60 had (40 years ago) - and it's decendants like Ada and ISO-Pascal still have today. But C vendors can't get it right or worse don't even try.
Martin