shamino said:
I suspect organization like this is why Mathematica was ported so quickly. The "10 lines" of code they had to change are probably the macros that identify the platform.
Mathmatica was written using Project Builder/Xcode...
Project Builder/Xcode was originally designed to be cross platform. Before Apple bought it, MacOS X's (It was called NeXTstep then) programming environment reportedly would support multiple platform binaries with a click of the mouse. NeXTStep ran on x86, PA-RISC, Sparc, and m68k CPUs. I've heard that it was nearly effortless to create a single application that would seamlessly run natively on all four CPUs.
In effect, you could have a program on a File server on the network. A person on an HP 9000 series machine (it's not x86 based) could run the program, a person on a Sparcstation (microSparc CPU) could open the same application, a person on a "PC" (x86 based machine) could likewise open the program. This would also be true for applications on CD, one version for all four platforms. The OS was designed from the ground up to support multiple architectures in such a way that the user would never know the difference.
I'm not exceptional with C++, but in reading the documentation on making universal binaries from Cocoa-based programs, I completely understood what changes would have to be made (damned few) and how to do it. It took me all of 5 minutes to understand what to do, and I've learned C++ from an outdated C++ in 21 days book. The cheesy command line stuff I've written requires no changes at all. The reason I don't have to do much is that all of the stuff I've written uses standard libraries, and Xcode for development.
For more on NeXT:
http://en.wikipedia.org/wiki/Nextstep
shamino said:
I suspect Adobe's code is not even close to being organized like this. So they're going to have to review/audit everything, even if the actual changes end up being minimal. Which is why they're saying it will take a long time.
I'd guess that you're at least half correct. I'm pretty sure that it'll take some substantial work to move the major Adobe apps to Xcode. My reason is as follows:
Carbon is a completely different story. It's derived from the "Macintosh Toolbox", which is the programming interface that was developed for the original Mac. The Macintosh Toolbox was original partially implemented in the ROM (hardware) of the machine. A terrible practice, but at the time it was faster. While it worked for Apple for a while, it was horribly tied to the hardware, and not very expandable or easy to update. The virtual memory system was unbelievably bad, the ability to keep progams from invading each other's space (usually crashing the machine) was non-existant, etc. From my experience, it was all UI with nothing underneath. The Mac toolbox was not designed to be portable, quite the opposite. This is why Apple's move to PPC from 68k, which seemed to occur seamlessly, amazed me. It may not have been that easy of a transition but it seemed like it from the outside. I wasn't a "Mac user" at the time.
Carbon is basically 90% of the old mac API (Application Programmer Interface) ported to a new OS + some new instructions. 10% of the old mac API was considered bad enough to be thrown out. New instructions and methods were added to replace the 10% that sucked badly, as well as to bring some new funtionality in. The problem is that companies who had written software for the Mac Toolbox had all of this old code still in the programs that had to be changed.
The reason this is so hard for applications that have been around a long time is because, most of the time, programmers/companies don't replace the old code. They simply add to it. It's not always the best way, but sometimes it's the only affordable, and fast enough way to release new programs. Windows XP is a grand example of the
"Winchester Mansion" mentality, in that it is Windows 2000 with about 4 or 5 million new lines of code added to the old. Since I don't work for M$, I cannot say how much of the old code was replaced, but I'm guessing it was a very small percentage.
There's more to it than that of course, but you should be able to see why some developers will be able to port their programs in a day or so, and other companies will have a much harder time. The reason Adobe will have a hard time is pretty certainly not about anything x86 at all. It'll be moving an application with millions of lines of code to a new programming kit that doesn't work the same way, and looking through tons and tons of old code. I'm not thinking it's rewrite level of nastyness, but a serious pain nonetheless.
The point is that the more of the old code (Mac toolbox) still lurking in the recesses of a program, the harder it'll be to convert. The programs that have been on the Mac the longest without a major overhaul will probably be among the hardest.