Which Coding Framework for Mac OS X ?
DrStrangeLoop asks: "I am in the progress of getting into coding for Mac OS X, and I am wondering which GUI framework/language i should focus on. Apparantly, there are at least three options: the Cocoa Objective-C API [I don't want to learn Objective-c, but it seems that's how Apple wants me to code], the Cocoa Java API [gets compiled to PPC binaries, lots of APIs available [think Google], but absolutely no decent documentation to be found] and Swing Java classes [look 'n feel of Cocoa, but portable]. However, the most important feature for me is a clean and easy IPC with BSD layer processes. I figure sockets will work with all options, but what about the other mechanisms? Any suggestions?" Update: 10/13 22:08 GMT by C :For those curious about the Cocoa/Carbon debate, you can find an article that discusses this very issue, here.
Thanks to the folks over at Freenode's #macdev for providing the link.
Carbon is a good API to begin with. You can use C++ or C and access all the nice GUI of OS X.
.NET == Cocoa
Cocoa just makes things a lot easier.
I like to think of it this way (though technically its wrong, its a nice way to think of it): Win32 == Carbon;
I'd go with Cocoa. The more native, the better.
There they were, sitting in the van with all those dials, and the cat was dead. -V. Marchetti, CIA
To be honest, I'd say get over it and learn Objective C. For an experienced programmer it won't take you long to get to grasps with the basics of Objective C, and Cocoa is really easy to work with. Who knows, you might even grow to like it :) At first I thought Objective C was weird, but now I really like it.
Get a beginners book and work your way through it. I recommend Cocoa Programming for Mac OS X by Aaron Hillegass, published by Addison Wesley, ISBN 0201726831. This seems to be what most people learn from.
The ready-made integration offered by your two Java alternatives may not be useful for hardcore I/O anyways. How do you get a handle on an fd-based resource (/dev/bpf*, for instance) and then integrate the fd with your event loop?
My moving-forward plan has been to maintain my application logic in standard C/C++, and use Cocoa/ObjC to build UI (and nothing else) on top of that. Since most good BSD code is asynchronous, and Cocoa/CoreFoundation lets you control the event loop at the "select()" level, this works fine for me.
As someone who grew up around Macs, and then moved to NeXT, I'd have to say that if you know C, and understand OO principles (prefferably in the Smalltalk model, not C++), then you can pick up Objective-C in an afternoon. It's really just some extensions to C. Carbon is a great set of APIs if you've got 10 years of Toolbox experience on the Mac, but otherwise, it's much harder to learn the ins and outs.
Cocoa, because of it's past with NeXTstep, has a lot of emphasis on rapid-prototyping and dynamicism. Lots of delegation, lots of easy stuff to do to get an effective solution. As for Java, I'd have to follow Aaron Hilldegrass' advice... don't. Not on the Mac, not unless your goal is cross-platform. If you're writing for the Mac, write in Objective-C, C++, or even REALbasic, but not Java. There's simply no good reason.
Having written nearly identical programs many years ago for Mac, PC and NeXTstep, I'd say this. Mac and PC (Mac = traditional Toolbox on OS7.x) and Win32 are roughly equivelent to get the work done. Different, but one isn't necessarily easier. The NeXTstep app was implemented in 1/3 of the time, and that included me learning NeXTstep.
While it is true that the Carbon framework exists, it doesn't give you access to the full capabilities of Quartz/Aqua ..
.. If you have basic C skills, you should be able to learn it quickly.
Carbon was designed to ease the porting of old OS9 apps to OSX, and AFAIK is meant to vanish.
You'd better use Cocoa and learn ObjC
My two cents.
I think you are missing a vital point. You can't just say "I'm getting into coding, is X or Y better?"
What is it exactly that you are writing? If you are writing a 3-D game, then the Java-Cocoa API is probably out. If you are porting your java-based massive application to Mac, than ObjC is probably out.
Basically, choose the one that fits your application's needs. If you just want to mess around though, go with Java-Cocoa just because it's more immediate.
Uninnovate - Only the finest in engineering.
I love C++, templates, and think nothing of derfrrencing a pointer to a vector of objects that are stored in a crazy containter that I cobbeled together last night while high on cough syrup and mountain dew:
However -
Objective C kicks ass for GUI apps. It's easy to learn, and hides some of c's rough edges, and it's fast to compile. Make no mistake - nobody's going to code the next operatig system in it - but for GUI apps, take this good tool and run with it.
Moneyed corporations, non-working 'poor' and criminal prisoners are turning productive citizens into tax-slaves.
Wrong. CLASSIC goes through a compat layer which is probably what you mean. Carbon and Cocoa are FULLY native on OS X. In fact, some Cocoa calls actually call Carbon API funcs. Even Apple developers use Carbon (iTunes) and mix Carbon and Cocoa in the same app.
Several advantages:
- Easy cross platform. Your app will run on any platform Mozilla/Netscape run on.
- Easy development. Subjectively, development goes a lot faster than under a traditional framework.
- Something you probably already know: most people I know who program already know HTML and Javascript to some degree. From there, it's a very small leap to XUL and Javascript.
The major disadvantage is that it will necessarily be a little slower than a custom coded native solution. But who cares for most apps? With recent Mozilla versions, it's more than fast enough. Anyway, my $0.02Patrick
"He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
I'm not sure whether it is suitable, but It does give access to the full API via "declare" statements.
Don't reject it out of hand just because it isn't a "macho" language.
I don't say it's the right environment for you. I do say you're being foolish if you don't at least take a look at it.
You can make a very good evaluation because REALsoftwarelets you download a version that is complete, and comes with full documentation (it produces time-crippled applications that only work for thirty days).
"How to Do Nothing," kids activities, back in print!
The above poster hit the nail on the head.
Now, for my own two cents regarding Java+Cocoa: Don't do it. Some friends and I programmed a Jabber-based instant messenger in Java and Cocoa before OSX was officially released. Working with the beta frameworks was a nightmare, for one simple reason: Nobody else was doing anything with Java and Cocoa. To my knowledge, there are only a handful that work with it now.
Like other posters have said, if you're just starting out on a platform, get over your fear of learning a new language. Objective C + Cocoa on OSX and C# + Windows Forms on WXP are the way to go. Also, Carbon, like MFC on Windows, is only really useful if you've got a lot of experience with the older Mac operating systems. There's a lot of cruft in there that's not really necessary and can be a pain to learn. You should find yourself developing a lot cleaner code a lot faster if you take the time to learn the newer tools available.
Have fun. =)
Obligatory resume (on topic because it lists the project!... riiight): http://www.cs.hmc.edu/~awooster/resume.htm
Um... no, "everybody else" doesn't use Carbon. The Carbon and Cocoa APIs are both used pretty widely. Older applications that were written for the pre-OS X Mac OS Toolbox are usually ported to straight Carbon, because it's easy on the developers. But new applications often use a combination of Carbon and Cocoa to implement different OS features.
There was a session on this at this spring's developer conference. Even applications like TextEdit, which you'd assume would be pure Cocoa, considering the source, use a combination of Cocoa and Carbon code in them.
Your generalization is wrong, sorry.
I write in my journal
But if you have a complex GUI, do take a look at QT/Mac from trolltech. It isn't FREE but it is quite good and allows your program to be portable between Mac/Linux/Windows.
--jeff++
ipv6 is my vpn
Definitely, learn Cocoa and Objective C if you can, just for the experience of realizing how much better it is that most of your other choices. With InterfaceBuilder, you can completely abstract your UI from the core of your code.
Since you say you want to use the BSD layer, I suggest making a command-line version of this core code first (you can do this in C or C++), since this will be immediately more portable to other Unices. Once that is done, tying that code in with the UI you build in InterfaceBuilder is simple.
Also, there are some pretty interesting native IPC libraries in Mach. If you don't mind your code being tied to Mach, you should check that out as well.
Oh, did I mention that Apple's developer tools and documentation are free for download?
I prayed about it, and God said, "Don't do it!" But I thought, "I know better."
Where in the blue hell did you hear that the developer license for Mac OS X costs money. The OS ships with developer tools.
Objective C is easy to learn and can be intermixed in the same source files with C++ (and obviously C). It's one of those "use the right tools for the right job" things. The GUI is most easily programmed with Cocoa using Objective-C, but if there's a nice library you want to utilize that's written in C++, there's nothing stopping you from using it.
Once you get comfortable with Objective-C, you realize that it is almost as easy to use as Java.
Now for the alternatives:
I used gtk for a while and now switched to Qt. It is just wonderful. I can just recommend it to anyone who is willing to use C++/perl/pyth/ruby or so. It is pretty solid, and (wit exeption of the moc-precesser) very beautyfully designed. It is portable and available on Win/Unix/Linux/MacX.
I ported some of our apps to Qt/Mac. Well, I recompiled the Qt stuff and the porting was related to other parts.
Even though many people don't seem to realize, it Qt is fully GPL. The plain, good ol GPL. So if you project is GPL it is a very good choice. If not, you probably have the money to pay and it is still a good choice.
Cheers, Peter
KdenLive/PIAVE - non-linear video editing
All that said, I would strongly recommend you take the time to learn ObjC Cocoa. I use Java Cocoa when I am grafting a Cocoa UI onto Java code, but ObjC is still faster (though the gap is narrowing) and I still honestly believe the language is still a bit more productive due to things such as Categories, Smalltalk-style method names, and other things. If you know C and Java and are familiar with the concepts of reference-counted garbage collection, learning ObjC will take you the better part of a morning.
If you are developing a GUI application from scratch and portability is not a concern, learn Cocoa. Interface Builder is hands down the best GUI-building tool in the industry.
If you are already a C++ expert and have no desire/resources to learn a whole new language, or you want to use a more traditional toolkit that's easier to port, or you are porting an app written for Windows or OS 9, use Carbon. It's essentially identical to the Mac Toolbox, with a few types changed and memory hacks replaced with accessors.
If portability is very important, use Java. OS X's implementation of the various Java GUI toolkits provides the Aqua interface automaticaly, as well.
It is possible to use all of OS X's native APIs (Cocoa, Carbon, and Posix) in the same project, if you really must. The libraries are already quite interdependent and any potential conflicts are noted in the documentation (i.e. don't use NSThreads and pthreads at the same time).
Yes.
--jeff++
ipv6 is my vpn
It runns just fine. porting from Linux to Mac? No, just recompile.
KdenLive/PIAVE - non-linear video editing
Truthfully, Objective-C takes ~2 hours to learn. In fact, check out the first chapter of my (needing-to-be-updated) tutorial, Using Objective-C++ on Mac OS X here for a comparison of ObjC to C++.
:)
I used to be a C++ programmer, and then I spent some time playing w/ Cocoa, learning how the system works, and now, if Cocoa goes away, I think I'll quit programming. Its simple elegance and power is astounding, and freeze-dried objects in the NIBs are just cool. Just play w/ some of the tutorials (e.g. currency converter) before you discount it.
However, Cocoa-Java is kind of worthless. It's a kludge, and some of Cocoa's coolness comes from the weak-typing (id is slick--sort of a void* you can send messages to). Take a look @ cocoadevcentral, too.
Carbon, though, is klunky by comparison. Programming for that is just like programming for Windows/Linux...it's an API, and you can do nifty stuff, but it's not slick. Cocoa is slick. 'nuff said
Josh
Yeah, after all, there's no reason to write good software when you can just write portable software.
Least-common-denominator approaches are good for nothing-- except grade-school arithmetic exercises.
I write in my journal
Carbon and Cocoa are merely two APIs that allow you to do the same thing. Carbon is procedural, Cocoa is object oriented.
Many things are easier to prototype and get your initial code up and running in Cocoa, but like an OO framework, you must design your object hierarchy well ahead of time.
There is also a rather serious learning curve for Cocoa, and if you decide to go with Cocoa over Carbon, you've essentially written off any xplat possibilities.
Most of the major applications for Mac OS X are written in Carbon, and will continue to be. Cocoa is a very cool OO framework, but it isn't right for every project, and the misinformation you're spreading is doing no one any good.
You wrote:
C++?Objective-C is an extensions to C (like C++) but, for the extensions draws on Smalltalk for inspiration.
In addition you wrote:
Cocoa is an updated NeXT API.
Objective-C is a small, elegant object-oriented version of C. It's very easy to learn, easy to document, and easy to modify. Compared to the size of Carbon and Cocoa, this is absolutely the least important part of your framework-learning experience.
So here's the deal. Cocoa is an elegant, brilliant, clean and simple framework derived from the (rightly praised) NeXTSTEP/OpenStep libraries. Carbon is an evily patched hulking pile of OS9-compatible goo. The difference between these two libraries could not be more stark.
Apple's proclamations otherwise (made to make Adobe and Microsoft happy), Carbon exists for exactly one purpose: as a porting library for legacy code. The nastiness of Carbon lends some insight into the hideousness of developing for OS9, one of the reasons Apple simply could not get the Copeland project working.
Use Cocoa.
You wrote:
:stares in disbelief:
um actually, stuff that is Free under the MacOS/MacOS X costs money on Windows for the same thing from another developer.
I use Windows at work and getting the same function as provided by a freeware Mac app costs money on Windows.
Mind you there are always exceptions to the rule.
My theory is that all Windows developers code fro money while some developers on other platforms code to give something back or just for the love of the platform (be it Linux, BSD, Mac, or something else).
Cocoa is alright, except that it uses Objective C. Objective C is a bastard child of C and C++, and it doesn't really mesh too well.
;)
Spoken like a true C++ programmer. Objective C is not a "bastard child of C and C++;" in fact, Objective C and C++ share nothing in common at all except for the C language, of which both are supersets.
Objective C is a much simpler language than C++. Oft-troublesome C++ features like templates, overloading, multiple inheritance, virtual functions, and "friends" aren't implemented in Objective C. Mastering C++ can take years, while mastering Objective C is a task for a couple of afternoons.
Now Nextstep, that's a whole different ballgame.
No, it's not. Cocoa is essentially NextStep.
I write in my journal
Comment removed based on user account deletion
Check out the article Introduction To and Experiences With Mac Cocoa from Kuro5hin.
I agree. Mastering C takes at least three days, four if you need to go to the bathroom.
Now the world has gone to bed, Darkness won't engulf my head, I can see by infra-red, How I hate the night.
A well-designed application will separate logic from presentation, at least to some extent. Because the Cocoa API is most easily called from Objective C, programmers are free to write their logic in straight ANSI C, and use Cocoa user interfaces for the presentation layer.
The same is true of Java; in fact, many programmers may prefer this. You can write all your application logic in pure Java, and use Cocoa/Java code for the user interface. If the need ever arises to implement a different user interface toolkit, you can just replace the Cocoa/Java code-- which will probably be only a small fraction of your total code base-- with Swing/Java or whatever you please.
The important thing to remember, here, is that, on the Mac platform, native GUI applications are always-- always-- superior to non-native GUI applications. If you don't use native APIs for the interface, you're crippling yourself from the outset.
I write in my journal
Qt is fully GPL.
Only when compiling for the X11 target, which requires Mac users to install XDarwin and Windows users to install Cygwin and XFree86.
Will I retire or break 10K?
wxWindows is a cross-platform GUI toolkit which emulates the native look n feel of the platform it is running on. It's written in C/C++ and runs on Windows, Mac, and Linux. The url is http://www.wxwindows.org. It gives you the cross-platform benefits of Java, as well as access to the underlying BSD layer.
I have started using wxPython (Python bindings for wxWindows) as my primary development platform, and am quite happy with it. It enables me to develop my application on OS X, even though my primary target audience is using Windows. =)
Uhhh... dude, are we talking about the same thing? The C programming language is incredibly simple. Hell, it only has 32 reserved words! (Plus or minus a few depending on your compiler of choice.) Any reasonably intelligent person who already understands programming concepts like functions and variables should be able to learn the entire C language in a day, maybe two.
Now, if you're talking about the C standard library, or the various POSIX APIs, that's a different story. The various standard C APIs are numerous and bewildering. But the same can be said of any language/API combination.
I write in my journal
If it isn't true, explain to me why what are free utilities for Windows machines are $20-$30 extortionware for the Mac.
Which utilities that don't already have equivalents in Fink (i.e. d*b**n gnu/mac os x) are you talking about?
Will I retire or break 10K?
Oh, OK, I'm an idiot! Apologies to the original poster! :)
Many things are easier to prototype and get your initial code up and running in Cocoa, but like an OO framework, you must design your object hierarchy well ahead of time.
Of course you're right-- who would know better, right?-- but you'd be surprised how many nontrivial Cocoa programs out there have only one class: Controller. They're basically straight procedural C programs with the Controller class in place of the main() function.
I write in my journal
I just started programming Mac OS X (I did a little Mac programming in the System 7 days and HATED it, since I was programming Unix at the time). But OS X is great.
I'm focusing on Cocoa myself, but here are some data points for you:
Objective-C is a lovely language. I looked it at back in the NeXT days and thought "cute, but it'll disappear and be replaced by a better version of C++". Well, Objective-C is still here, and C++ never got any "better". So you ought to learn Objective-C, it's very much like Smalltalk mixed with C, very elegant. I might start writing Linux and BSD programs in it. Also, it interfaces easily with the BSD side of Mac OS X. For instance, you want math libraries? You just use the standard math.h stuff! That's nice.
Don't use the Java Cocoa stuff. It STINKS. I think they just added it for a "bullet point". The documentation isn't as complete. It's very slow. Objective-C is a nicer language anyway, since it is dynamic. With Java you have to use a lot of reflection hacks to get the same results, not nearly as elegant.
Java DOES NOT (correct me if I'm wrong) compile to native code with ProjectBuilder. ProjectBuilder simply wraps a launcher around the java bytecode. If you drill down into the application package, you'll find the regular jar files.
The use of the Java Swing (non-Cocoa) stuff is simply to get your existing Java apps up and running fast. It took me just a few minutes to turn a Java program I wrote on Linux with Forte into a double-clickable (but slow) Mac OS application. Don't bother using this for new stuff. Your program might LOOK like an Aqua app, but it's really Swing.
Carbon let's you use C/C++. But it isn't a "compatibility layer" .. it's not obsolete or "going away". It's simply a cleaned-up version of the original Mac API. So if you choose this route, don't feel like you'll have to stop using it one day or something. I think Apple will support it indefinitely, alongside Cocoa.
Cocoa is a little slower than Carbon, because Objective-C is a dynamic language, and it has to decide things at run-time (like, say, Perl). Not a big deal these days, but raw speed is not a selling point of Cocoa GUIs.
AppleScript Studio: if you like applescript, you can write full applications in it. Just like on Linux you might want to throw together a simple Python script, etc., with a GUI. It doesn't hurt to learn applescript, especially if your Cocoa apps will be scriptable.
Interface Builder is just soil-your-pants awesome and let's you create, instantiate, and hook together non-GUI objects, right along with GUI objects. Also note that IB actually creates the GUI and other objects and serializes them to a disk file. It doesn't create any code or do any other tricks. And XML is used throughout for properties, etc..
So IMO your best choices are: Cocoa/Objective-C, or Carbon/C (or C++, blech). And I think everyone should learn Objective-C .. I'd like to see it used more for non-Mac stuff too.
Everything you need, including books and tutorials, comes on the Developer CD. Go through the Cocoa/ObjC tutorial.
Also note that if you sign up for the Apple Developer stuff, you have to agree to some pretty disgusting terms, including giving Apple the right to search your place of business on 24 hours notice. I shit you not.
Mac users care a great deal about nativity and the app behaving like a good Mac OS X app. (Otherwise we could be using something cheaper and less elegant, right?) Cocoa is the most native thing on OS X. If you use Cocoa, you have an immediate advantage over competitors who use Swing or Carbon.
With Carbon you have to implement a lot of stuff Cocoa gives you for free. I still haven't seen a non-sample-code Carbon app with proper Unicode support. Then there are things that Swing apps just can't do. (And don't believe Sun's pluggable talk. You can't just plug in Aquaness without designing for Aqua.)
The Cocoa Java API feels like an Objective-C API anyway, so you might just as well learn Objective-C unless you already have Java back end code.
Objective-C is way cooler than C++.
The difficulty of learning a language has little to do with the number of keywords it has. It is more a matter of how those keywords (and operators) are used together to enable programmers to do things. C is not that hard but in some cases it can get complex compared to other languages (even if those other languages have more keywords). Pointer arithmetic is one area in which many people struggle. Especially if you come from a programming language (like Java, ...) which doesn't have that.
C++ adds a number of keywords to the C language but not that much. Even so it is a highly complex language with lots of special constructs and exceptions.
Greetings,
Project Manager of Crystal Space (http://www.crystalspace3d.org). Support CS at http://tinyurl.com/cb3x4
you can still compile C code with an objective-c compiler, infact, Objective-C isw a true supper set of OO features appened to C, so would you then not be able to use Coaca with C code as long as you compile into an objective c binary?
I am the Alpha and the Omega-3
...I'd also suggest taking a look at wxWindows. They're open source, the results look very mac native (they have screenshots), and it seems to be very portable....having libraries for windows, most *nux (using GTK, Xt, or Motif), and macs, and maybe a few others. Oh, and it's c++ for those with an objective-c phobia, like me :)
I honestly don't know why more isn't done with this framework outside of those crazy python people. It looks good, and is completely free (both as in beer and speech), unlike Qt (not trolling, just stating a fact!)
You say
Um, no. Carbon is a transitional API, designed to make it easy for OS 9 apps to migrate to OS X. It's not bad, but it's procedural and requires you do to tons of stuff by hand that Cocoa gives you for free. If you're writing a new Mac OS X app, there's very little reason to use Carbon.
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
If you follow a sane strategy, and don't use Objective C OR Carbon C++ (and its associated event and I/O management cruft) to handle your application logic, I don't see what the advantage to Carbon is.
That is to say, if all your application logic is straight C++, and you're only doing UI and event integration in "Native" MacOS, why would you choose to use Carbon (which seems approximately as complex as Win32) instead of Cocoa?
Way, way off-topic, but your sig is wrong. You wrote:
"It's fuzzy-minded liberal thinking like that that gets you eaten." - Principal Snyder
The actual quote-- which is priceless-- is, "That's the sort of fuzzy-headed liberal thinking that leads to being eaten."
Just FYI. Please don't tell anybody that I watch "Buffy."
I write in my journal
First of all, there's a "fourth" alternative that you did not mention: Carbon. It's a C API that represents a subset of the old Mac OS 9 APIs. It will give you access to Cocoa and CoreGraphics goodies while also giving you access to all of the wonderful Mach and BSD APIs.
However, Carbon is no fun, IMHO. It's just not as easy to work with as something like Cocoa or Swing.
Second, why do you say that Cocoa/Java is not well documented? Just look at developer.apple.com and read all about it... Besides, all Obj-C Cocoa APIs have equivalents in Cocoa/Java. So it shouldn't be that hard.
But, why use Java? Maybe you like it, in which case, go for it... But I think that if you have C and C++ experience you'll find Objective-C to be much more robust for Mac programming, simply because: 1) you can learn it quickly if you already know C/C++, and 2) you get a well thought-out API (Cocoa, formerly NeXT's AppKit) with access (both via Objective-C and via libc and other C APIs) to Mach, BSD, and Mac OS X specific goodies.
And, for the love of all that is good, pure, and holy, don't use Swing. It's disgusting. Someone needs to beat it into the ground and start from scratch. The only reason that I would see for using it (and, granted, it's a good reason) is for portability... But in that case, I highly recommend Qt (www.trolltech.com). It works nicely on Windows, Linux, and Mac OS X... Only problem is it isn't necessarily free. =(
Personally, I learned Objective-C in a couple of evenings after reading Apple's (formerly NeXT's) excellent book on Objective-C. It's available for download in PDF format from developer.apple.com.
So I say go for that, I'm sure you'll be impressed with the results you get.
Exactly, if you are already familliar with Carbon-stype API (read: MacOS 9), it is a good way to go and will get anything done which Cocoa would do, although certian issues won't have quite as suave a solution as Cocoa would provide.
Apple was sure to optimize the Carbon APIs not only for compatability but because sometimes your project doesn't need to be Object-Oriented Cocoa style, Carbon will work just fine and just as clean. I am starting to think that some people (who aren't "in the know" with the Mac) confuse the Carbon set of APIs as analogous to running in Classic mode, which is entirely not true.
CAn'T CompreHend SARcaSm?
Who's to say that you can't write good software in Java?
Absolutely you can write good software in Java. I've seen it done, although I admit that I don't have the mad Java skillz to do it much myself.
But you can't write good software with Swing. Swing may be a fine user interface toolkit on UNIX, where there are no superior alternatives, but on a Mac, a Swing application-- unless it's specifically tweaked to use the Aqua look and feel-- is kind of an embarrassment. Java Swing apps run on OS X just fine, but they're unpleasant to use.
this post just makes me angry
I'm sorry. You get angry at strange things. Must have missed my post in another discussion about how disappointed I am that Mozilla is irrelevant; that post made lots of people angry.
I write in my journal
I don't usually comment on this sort of thing, but how could my post have been interpreted as flamebait? That's just confusing to me. Can anybody shed some light on this? Maybe I was offensive in a way that I'm just not seeing.
I write in my journal
Mozilla/XUL on OS X is hard to take. It reimplements the entire UI toolkit (and what it comes up with looks nothing like the Apple guidelines). It's also incredibly slow (as in, KEYSTROKE LAG in text inputs!). And unlike in Win32, where IE can hide in the background and leave you with something that looks like an application, in OS X you'll be literally running your application through the nightmarishly bloated Mozilla environment.
You're also kidding yourself if you think you'll wind up with something cross-platform. XPCOM doesn't magically make a C library compiled PPC Mach-O work on x86 ELF.
Don't get me wrong; I like the COM/DOM/C++ environment and have worked on teams that used it successfully. But right now I think it's mostly applicable to dynamic web applications (people put up with more in client/server situations).
Yes, they most definitely are. But for programmers with less experience-- say, the 5-year programmer instead of the 10-year programmer-- features like multiple inheritance or overloading can cause more problems that they solve. A complex class hierarchy with templated classes, lots of cross-inheritance, and overloading happening all over the place can be a real bitch to maintain.
I write in my journal
ACK! Of course, you're right. Who can forget Armin Shimmerman saying "wooly-headed liberal thinking!" Thanks for correcting me.
I write in my journal
Cocoa is the framework of choice for most OSX programming. The mechanics and syntax of Objective-C is easy to learn--you can pick it up in a couple days. (Making full use of what it provides you is a different matter--it can take months to stop thinking like a C++ programmer and take full advantage of the dynamicism of the language.) If you're doing any GUI programming this is the framework you should use.
Carbon exists to provide a way for old codebases to run on OSX. Consider it only if you're already familiar with pre-OSX mac programming, and then only if you have a big, old codebase.
Java is useful for cross-platform server apps.
There may be exceptions, however. Perhaps, for instance, the Cocoa QuickTime classes are wrappers around the Carbon classes. Since I haven't done any QT programming at all, I'm merely speculating.
There ain't no rules here; we're trying to accomplish something.
If you had done the least bit of research before asking this question, you'd already know to pick Cocoa.
Carbon is old, and fastly deprecating.
Cocoa is "the" API to use, and you can intermix C and C++ code to your heart's content with it (eg. BSD code)
Cocoa/Java is considered crap, even by Apple (see Apple dev docs), and is not ready for prime-time.
Pure Java is alright, but doesn't give you access to BSD stuff.
In short: duh.
Yes, they are, fucking look at the kernel source before you post drivel like this. Various parts of the kernel are coded in C, C++, and Objective-C++
OK, in 1.4 you can, at least, get a list of the interfaces and IP addresses on the machine, but to get the subnet mask and default gateway for each interface you have to revert to something platform specific. ICMP? Forget it. Unicasting to a known MAC address when the destination device doesn't have an IP address yet? Forget it. Other low level protocols for which raw socket access might be useful? Forget it.
Sockets and threads; the spec says that if you have one thread waiting to receive on a socket you can cause it to stop waiting, and throw an exception, by closing the socket in another thread.
Now, if you do this to the native socket API you get difference results on different platforms. I may not recall all the details correctly but it's something like: it works on Windows; on Linux it works for UDP sockets but not TCP sockets; on Solaris it doesn't work reliably for either.
Fine, so the whole point of Java is portability, right, so the JVM somehow works round these differences in the underlying socket API, right?
'Fraid not quite right - there are some bugs listed against 1.4 which suggest to me that the JVM implementation of closing a socket in one thread whilst another thread is waiting on some sort of receive is not done cleverly at all, it just calls the native socket API and passes the differences up to the application, which is therefore not portable.
[I haven't done all the expermiments so some of the above is probably wrong in detail - I'd be grateful for any corrections from anyone with first hand experience.]
[So in fact the portability of Java is no better, in this respect, than writing the same thing in C direct to the socket API, except that it's probably harder to come up with nasty fudge workarounds in Java.]
There are two separate issues here: which GUI toolkit to use, and whch language to use. First, choose the GUI toolkit, and then choose one of the programming languages which can be used with that toolkit.
Most of the toolkits support multiple languages.
For new development, I'd strongly recommend using Cocoa with Objective C. Don't be afraid of Objective C! It's a very simple extension to plain old ANSI C. The additional syntax is minimal (unlike C++) and most of the code you write will be plain old C. Once you've learned Cocoa using Objective C, you may want to use it in Perl via CamelBones. But I'd strongly recommend using Objective C to learn Cocoa, otherwise you won't understand a lot of the reasons why things work the way they do. Don't use Cocoa with Java, unless you don't know C. And even then I'd recommand learning C so you can use Cocoa with ObjC.
If you want a plain old non-OO API, Carbon isn't all that bad. You'll need to get a good reference, as there are a lot of functions and types to learn about. (Whereas Cocoa is predictable enough that you can usually guess method names!) Or you can use one of the C++-based wrappers such as QT or PowerPlant.
-- Tim Buchheim
I also thought that it was pointless to create a native application using java, but then, out of necessity, that's exactly what my first OS X application ended up being.
:)
I have a web-based app that I wanted to create a non-web GUI for (involved various file uploads and stuff that could more easily be handled via a native GUI). The server supports XML-RPC, but at the time, I didn't have an XML-RPC framework I could use from Objective C. However, I did have a fully functional commandline app that did it that I'd written in java.
So, I just fired up project builder, told it I was writing a java cocoa app, and spent a while getting the UI the way I wanted it, then just plugged in a couple methods to the controller to call the existing code.
Because this was my first OS X application, it was a learning experience as far as picking up the cocoa concepts and stuff, but it only took a day of me being home sick (and I felt pretty crappy, so I wasn't working all that fast).
The time I spent learning cocoa concepts was not wasted at all. I figured out how to build frameworks and get them into my application, so I had the stuff I needed to go full objective C. I *copied* the UI I'd already made into a new project, and pasted a lot of the code straight from the java app to the objective C app (mostly controller stuff). Of course, I had to convert the java cocoa calls to objc, but for the most part, that was it.
Moral of the story: If you intend to write a native OS X app, and you don't have all the parts you need in objc, but you do have most of it in java, do it in java! It was a good proof-of-concept anyway.
-- The world is watching America, and America is watching TV.
Re C and pointers:
;
;
Understanding pointers is a challenge for many C newbies. It helps if you remember that a pointer is just a number, usually a variable but sometimes a constant, which represents an address in memory. It helps even more if you can remember that that address in memory is just an offset from the start of the memory (note this only works on architectures with flat addressing; it gets a bit hairier on, say, DOS).
Since C is a pass by value language, passing a pointer (or anything else) means passing a copy of a value. In the case of a pointer, that means a copy of the address, so now both the caller and the called function know that some memory exists, and can (in the abscence of const) modify it.
Since the pointer is just a number, it can be added to. Adding to a pointer actually means that the address is incremented by the amount of the addition times the size of the thing being pointed to. In other words, the compiler takes some pains to ensure one is alsays pointing to the start of what should be an object, and not within the guts of the object. So if I declare a a pointer to a 2 byte sized object, adding one to the pointer will point me to the next two byte oject in memory, and not to the second byte of the first object.
Naturally, the programmer must allocate the memory to be pointed to. The pointer is merely an address, it's not the memory being addressed. Declaring a pointer gives the programmer a place to write the address down; it does not create the mmemory: the fucntion call malloc ("memory allocate" ) "creates" the memory.
I beleieve the OP noted he came from an assembly background, which means that he's used pointers (untyped ones at that) so it may be less of a challenge.
The other C pitfalls for the unwary are the declaration structure, and (related) to this, the way arrays are handled. Several primers exist on decoding declarartion syntax; in a nutshell, declarations should be read from the inside out, left to right until a right parenthesis forces reading right to left. The declarartion:
int ( *f )( char )
is read "f is a pointer to a function taking a char argument and returning an int.
In C, arrays are not first class objects, and so when passed to functions they "decay" to pointers to the first element of the array. An array name can be treated like a pointer, and indexing into an array is defined by the language to be exactly equivalent to dereferencing an array plus the index:
Given
char array[ 4 ]
array[ 0 ] is just *( array + 0 ); and array[ 3 ] is just *( array + 3 ). array[ 4 ] is *( array + 4 ) and is an illegal (well, undefined) dereferencing of the "element" one past the end of the array.
I have said too much for a post, so I'll end now. The point is, as long as one remembers a few key ideas: pass by value, pointers are numbers for addresses, and declarations need to be read inside-out, C is rather straigtforward.
Opinions on the Twiddler2 hand-held keyboard?
I have to tell you, I LOVE Cocoa/Objective-C. There are a million benefits to both - Cocoa ( in combination with Interface Builder) gives you fantastically easy GUI creation and control.
The Objective-C language has got to be the coolest language I have ever used. I love being able to add a method like -encryptWithKey: to the NSData class without subclassing it.
The automatic memory management with -retain and -autorelease is great, too. Almost never have to worry about it.
Besides all this, you can use straight ANSI C code (and C++, too, in Objective-C++) right in the same source file.
In short, give Cocoa a look. If it doesn't meet your needs, try using one of the other solutions. The only thing I can come up with where you would need to not employ Cocoa is if you desire easy portability.
I would not be scared of learning Objective-C--it is a very simple language and easy to learn, and its object model is very convenient. But in other ways, Cocoa using Objective-C is a somewhat outdated programming environment: the GUI design tools were great in the 1980's, but they are pretty dated by today's standards. And resource management in Objective-C and Cocoa is a lot more work and a lot more error prone than in Java or C++. On the plus side, Cocoa is what Apple really wants you to use, and that's where they seem to be putting a lot of their efforts.
Cocoa using Java is probably in a certain sense "the best" programming environment for the Mac: it's modern, easy to develop in, and mostly safe. It's also pretty well supported. But it retains many of the warts of the Cocoa APIs and, as you observed, is not all that well documented.
With either Cocoa-based solution, you also have to ask yourself whether you believe that Cocoa has a future and whether it's worth learning it. I don't see much of a future for Cocoa, at least in its current form. Apple has made no moves to standardize it or open it up, so it is Mac only. Even if Apple pushed for more widespread adoption, they'd have to make big changes to make it palatable to industry, like adding precise garbage collection and better error checking to Objective-C, with the resulting changes to the APIs. An example of work in that direction can be found here (yes, that is "gerbil.org", but it's a site about programming, really).
Swing Java is probably the least hassle: it's well documented, it works very well on Macintosh, and you still get the native look-and-feel. It has modern resource management and modern layout management. Knowing Swing is useful and helps you on other platforms as well. And its object system is fairly similar to that of Objective-C. But some of the more advanced features have been buggy in the past (e.g., audio input, etc.). You can, however, combine Swing and Cocoa APIs, using Swing for the GUI and dropping down into native APIs only when Sun's cross-platform APIs fail you.
If you use one of the Java-based solutions but find the Java type system too constraining, you can use Jython, a Java-based implementation of Python. You can choose to run it interactively or compiled. It's great for exploring the Cocoa APIs (or the Swing APIs).
Another choice you may want to consider is wxWindows. Recent versions run very well on MacOSX and look native. If you want to see an example of an application written in wxWindows, take a look at Audacity.
I tried all these different approaches, and I ended up doing most of my Mac programming in Java/Swing and wxWindows.
First off, the Swing Thing isn't a thing like Cocoa in terms of look-and-feel. It looks-and-feels awfully second-class on many levels.
Don't even think about Carbon. It's 18 years of evolution from a bitty-box API that was in Pascal.
Cocoa, on the other hand, is NeXTSTEP, and as any NeXTer can tell you, NeXTSTEP was the best operating system ever (at least the best API ever). It's amazing. Ten minutes with InterfaceBuilder and you'll be hooked. Where as most tools of this sort just give you some kind of data thingy that you have to interface with programmaticly using some magic codes, you can actually put OBJECTS in a NIB file, which will be unpacked at runtime, and automagicly referenced in places where you have references to them. They have these actions and connections. It's great.
Java is my favorite language (although recently Ruby has been fighting hard for that space), but I must say, the docs for Java-Cocoa are terrible. I gave up and learned ObjC.
That, inititally took about 45 minutes (I've done C++), but actually getting through the qwerks to where I could use the language well took 2 weeks or so. In a nutshell: If you are used to garbage-collection, you will hate ObjC. Period. It stinks. In almost every other respect, however, ObjC is a great language.
The Java documentation may have improved a lot since I ws reading it.
No, in short: Cocoa, cocoa cocoa. And Java if the docs are decent by now, otherwise Objective-C.
IF you already know C then learning Objective-C will take a week or two. If you know C++ or Java, then learning Objective-C will take a day or two.
Cocoa is, bar none, the best environment to develop applications under, on any platform. Therefore, if you've already chosen the Mac platform for your App, then use Cocoa.
Carbon is there fore backwards compatibility. Some parts of the OS are still carbon, and carbon and cocoa have been "toll free bridged" in places so you can use data structures interchangably. but it is much slower to build an app with carbon than cocoa.
So here's the simple way to answer your question:
1) IF you simply must use Java, or want to eventually run on multiple platforms, use Cocoa-Java (Which is well documented. Get Cocoa Browser to get easy access to the docs.) Use any Cocoa book to learn how to write in cocoa-java, just use the Java APIS instead of the Objective-C ones. Though Java isn't perfectly supported and Objective-C is recommended if you don't HAVE to use Java.
2) IF you have a large application ( greater than 10,000 lines) then it may be better to use carbon. A huge app, like photosohop, it definately makes sense. but any small application would be better off with rewriting the UI using the Appkit and Objective-C and just bringing over the calculation and graphics stuff from the previous version as-is. After all, Objective-C and C code (and even C++ code and Java) can be intermixed.
3) You should never start a new application using Carbon. Carbon is for backwards compatibility. IF you're starting a new application, use Cocoa and you'll save so much time with the superior cocoa apis that the time it took to learn them will be more than made up for.
I had a Java application that I wanted to bring to Mac OS X. I started down the path of Cocoa-Java and quickly realized that objective-c was recommended, so I checked it out and discovered even the fact that I was learning a new language, as well as a bunch of new frameworks, I was getting a lot more work done faster using Objective-C and Cocoa than I have in the past with Java.
Carbon is there for backwards compatibility when it doesn't make sense to rewrite the app. Cocoa-Java is there when you have a JAva app you want to migrate. But Cocoa with Objective-C is the clear, definite, best way to go under Mac OS X.
And anyone who's taken the time to learn it will tell you that it is far superior to the alternatives.
I dread dealing with Carbon APIs now as they invariably turn into time sinks where it seems to tkae 4-8 times as much effort to get something done as it would if there were a cocoa api for the area in question.
Go Cocoa/Objective-C.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
Probably because that is the reason I decided to support mac development. My apps need a common code base (since they are for linux, windows and mac os x) and java is the easiest way to go. Custom UI, standard classes.
As far as the Carbon programming maybe it's the developer not the tool. I could try building my own house (by hand) but why when I couldn't frame a house to save my life? My framer is skilled in building and I am not. Same goes for Carbon programming, Adobe Photoshop seems to run just fine and it's a carbon app.
I recognize that xpcom components are not automatically portable, but they are a heck of a lot more portable than most similar environments. XPFE takes care of most of the nitty-gritty work necessary to make them portable.
"He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
C# is already dead. It would be stupid to write applications in it.
Nobody is going to support it because everyone knows that doing so puts them at the mercy of Microsoft, and microsoft has shown themselves to be both desirus of the entirety of the application market and also willing to undermine the ability of competitors to work on the platform. C# makes it really easy for them to do this.
COBOL has more of a future.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
Cocoa puts you in the MVC pattern, meaning that you have rather good portability if you decide to go to a different view-- just subclass your controler and tie it to the new UI.
Objective-C is portable because GCC is portable.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
Premature optimization is the root of all evil.
Real artists ship.
People prefer software that actually works.
I'd rather be rich and not have the the respect of a poser such as yourself.
However, if you're working on a product to compete with mine, I can't help but agree that you should be using assembly for everything-- and to recommend that you create your own ui widgets while you're at it.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
Microsoft only has %40 market share. Linux has %10, and the various Mac OS versions have the remaining %50.
Get your facts straight!
PS- for the impaired, my point is to point out that the %95 number is just as fabricated as the numbers I gave.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
>[Qt is fully GPL] Only when compiling for the X11 target
Not if you purchase a license! Qt is well worth the money!
Only if you're in a for-profit business. Qt/Mac will expire after 30 days. Most hobbyist developers (such as myself) don't have upwards of $1500 for a widget set. And according to this FAQ entry, Trolltech releases Qt Free Edition only for operating systems that are free software. Thus, Trolltech will not release Qt for Windows until ReactOS is complete, nor Qt for Mac as free software until GNUstep is complete.
Will I retire or break 10K?
What the hell? I thought Ambrosia was a quality place but this is pretty silly:
but like an OO framework, you must design your object hierarchy well ahead of time.
You should check out XP-- Extreme Programming. Its an excellent methodology that works fine with OO development. Its quite trivial to refractor your code when your project changes direction.
I'd say spending time designing your object hierarchies before you start programming is an example of *bad* development process, not good, even though I used to do exactly that same thing.
There is also a rather serious learning curve for Cocoa,
True, though it is significantly less of a learning curve than you have to deal with for Carbon. Cocoa re-uses objects a lot, whereas every Carbon API has a whole new set of data structures it takes as parameters, etc.
The learning curve is much lower for Cocoa than for Carbon. (And consequently, development is much faster in cocoa as well.)
and if you decide to go with Cocoa over Carbon, you've essentially written off any xplat possibilities.
That's just silly, unless your idea of "xplat" is crossing between OS X and Mac OS. But OS 9 is dead and I don't think people are really writing apps to support it. As for going from OS X to windows or linux, you have FAR MORE xplat possibility with cocoa-- first off there's cocoa-java, but even if you use objective-c There is work on an open source cocoa called gnustep. I'm aware of no xplat carbon frameworks, let alone superior ones.
Most of the major applications for Mac OS X are written in Carbon, and will continue to be.
That's just crap. Most of the major applications written for OS X are written in Cocoa. The only carbon apps are ones that started on OS 9 and were ported.
IF you're porting an app from OS 9, sure, use carbon. But if you're starting from scratch, it would be stupid to not use cocoa.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
Yes, when you say something strongly (eg: not couched with lots of "I think" and "if its ok with you for me to think this way, my opinion would be.. but if its not ok, I retract what I said") and the moderator disagrees with you, and is your tpyical slashdot incompetant pseudo-geek idiot, they will mark you as flamebait simply because they disagree with what you said.
Moderation seems to often be more about whether the moderator agrees with you than in weeding out the actual flamers.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
I think you represent the average linux user.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23
in obj-c memory mgmt is much better handled. when you make an object a "reserve" is put on it. when yr done with the object, you "release" it. you can add as many reserves as you want and release them when you wish. when the reserve count finally reaches zero, the object is deallocated. brilliant!
the skinny on obj-c and memory is here
if you find you have objects deallocating prematurely and are losing track of yr reference counting, get the object meter from omni group (makers of omniweb). there's a free demo license that works quite well for the budget-challenged.
2 1337 4 u!
Unless you're planning for compatibility with MacOS 9, Objective-C and Cocoa are the language and API you should be using. The Quartz API is far more robust and does a lot of things better (e.g., rendering fonts) than Carbon does. Java Cocoa programs tend to have a huge memory footprint simply because Java comes with an enormous framework of classes that needs to be linked in.
Carbon also has the disadvantage of being a bitch to program. I think I'd rate Win32 and Classic MacOS API's (which is what Carbon is) as bing at about the same level of difficulty to program in. Objective-C isn't all that bad: it's like C with Smalltalk grafted in. Once you pick up the basic syntax, writing graphical applications using Cocoa is a breeze. The Developer Tools CD comes with everything you need, including compilers and full API documentation. Consider it a fun learning experience.
N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
Proof by counterexample: I write free programs for Windows - so do a few thousand others, the last time I checked.
Ooh, that was easy! Give me another one! :-)
Tim
> Many parts of Cocoa are built on top of Carbon
Well, sorta. Most parts of Cocoa and Carbon are built in top of CoreFoundation.
I would say, however, for someone who doesn't know either Carbon and Cocoa, Cocoa is quite a bit more applicable for use in the future. Carbon will die sooner or later, perhaps to the successor to OSX.
> Objective C is a bastard child of C and C++, and it doesn't really mesh too well.
What? Objective C is older than C++.
You were probably marked down as a troll because of:
> because the developer license costs money for Mac OSX
Now, the moderator probably interpreted this as "A developer license for MacOSX costs money", instead of "A developer license for the MacOSX version of Qt costs money". The first is true, and the latter is not.
Don't write to the OS, write to the customer's requirements. If you *must* write to the OS, do what the vendor tells you, else they will cut off your oxygen when you can least afford it.
Unless it's GUI/multimedia intensive, it should be possible to pick an API that you and your customers can easily move to other OSes and other hardware.
> C# is already dead. It would be stupid to write applications in it.
.NET. Because of this, I've seen many MFC (probably the most used graphical API), switch to C# and Windows.Forms once they switched to VS.NET, bypassing MFC7. Conversly, I've seen many VB developers bypass VB.NET for C# (the two are quite similiar anyways).
Not true at all. Microsoft has said that the future of the windows platform is
The only people who won't switch anytime soon are people who have huge codebases using MFC or plain win32 or win32-based internal API's (which companies such as Adobe use).
However, Microsoft has assured the success of C# pretty much by most other windows programmers by making managed C++ really quite a kludge (and slow) compared to managed languages such as C#, VB.NET, or MFC with C++ (or win32 and C).
See, now that's the BitGeek that I've come to know and love. ;-)
I write in my journal
What I'd really like to know is, what would be the best API for porting a large existing program to Mac OSX?
Say I have a medium-to-large C or C++ program. Currently it has a Windows GUI (using MFC or straight Win32) and an X GUI (using Gtk or Qt). Now I want to port it to OSX, taking as much advantage of existing code as possible. What API do I use?
(e.g. I am excited about all the possibilities of Cocoa, but is it really that easy if the core program is NOT OSX-only?)
rjrjr
I must recommend Qt. You'll get neat code, portable to Win32, X-windows, BeOS, etc. Get it from Trolltech!
So what you actually mean is, instead of saying this:
You should have said this:
as it's more accurate. And probably less contentious.
Hmmm....I think I feel another exception coming on... :)
Tim
I have to confess I don't fully understand this perceived dichotomy between Carbon and Cocoa. I've been doing Macintosh programming since system 7.x and I've recently gotten into Cocoa. There were some fears initially that I wouldn't be able to use any of the code I'd written previously, but that fear was allayed with this:
#import <Carbon/Carbon.h>
I can bring the Carbon headers right into any Cocoa project or object and then drag over old code. No biggie. (Although for the record, it's not 100% backward-compatible. You do have to tweak things a bit.)
I'm not sure that Apple ever intended Cocoa and Carbon to be rival approaches, but rather complements--that's how I'm using them. Still, this perception exists.
--Rick "If it isn't broken, take it apart and find out why."
If time was money we should all sit around waiting to get rich.
Not only is it horrible, but it is also about as slow as anything ever has been.
I suggest going with a native interface, and if you don't want to do ObjC do C++ and separate the logic and the display. Don't try too hard to get something portable, that will work against you. Concentrate on making a good piece of software and code clean and easy to understand C++. It will be much easier to port it if you have a good design.
This is just FUD, there isn't a lot that you can do in Cocoa, but not in Carbon (or vice versa). More and more they are just becoming two representations of the same basic API's. In fact, often enough Cocoa calls Carbon to do its thing.
BTW, as long as Photoshop and Word aren't rewritten (yeah right!), Carbon won't vanish.
The Drowned and the Saved - Primo Levi
Why do people have trouble with pointers in C? Well let's see:
What about the subtleties of:
or the difference between the following:
and the following, why does the assignment in foo work albeit get thrown away when the function exits, but the assignment in main not even compile:
The basic concept of pointers is quite simple, but to code in C effectively using them requires days of practical experience.
All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
SWT suffers from exactly the same flaws that doom Swing. It's ugly, and user interfaces created with it are unpleasant to use. It looks like exactly what it is: a user interface designed and built by a UNIX user with no particular concern for the overall user experience.
No, thanks. I'll stick with Aqua. That way I can use a computer without feeling like I want to claw my eyes out at the end of the day.
I write in my journal
Part of the operating system is (Darwin). But all the graphical stuff you see is not. It is not related to Linux, it *is* related to Mach and BSD. Darwin already runs on x86. Furthermore, if you need to have your Mac OS X applications run on other platforms, you can use GNUstep, but you'll have to avoid QuickTime (patent issues) and some things that are only partly implemented in GNUstep currently. After that, you can run Cocoa applications on other UNIX systems (like Linux, *BSD, HP-UX) and in the future, Windows (there is a Windows graphics backend, but it's in an alpha state).
"People who like C either like to tinker or believe they're going to live forever." Could it possibly be due to the stability and bug free compiler, compared to C++?
Yes, the nick is flamebait
Yes, except that developers for the microsoft platform are the MINORITY, not the majority.
Yes, MS has a large installed base and a large part of one segment of the market-- but the rest of the industry is not going to adopt C#.
The language is DOA. The only question is will it destroy microsoft in the process, or not.
Yeah, and you guys panned the ipod too: http://apple.slashdot.org/article.pl?sid=01/10/23