Skip the navigation

A developer's-eye view of Leopard

By Tom Yager
June 21, 2007 12:00 PM ET
list of completion options; the selections narrow as the user continues to type. Xcode's innovative code templates lay out fill-in-the-blank statement completion; merely navigating inside the editor is sufficient to perform context-sensitive documentation lookups. Research Assistant, which runs in its own window, displays a summary paragraph from the online documentation for any highlighted keyword.

Also of interest to those developers new to the Mac -- and possibly to object-oriented development -- are improvements that speed the editor's handling of large source code files. Apple claims to open and scroll through big monolithic code files up to 10 times faster than before.

Lastly, Xcode incorporates code folding, which collapses sections of code (such as a function or object definition), as well as block highlighting features that distinguish logical blocks of code through shading.

Beyond the editor, Xcode 3.0 has a number of new "grown-up" features that are hard to come by in noncommercial environments and were previously nonexistent for Objective-C. One is refactoring, which allows a single code change to ripple through an entire project. Xcode 3.0 refactoring obviates the need for file-by-file find-and-replace after renaming and restructuring classes. It also updates existing Objective-C code to take advantage of Objective-C 2.0 enhancements.

Lastly, Xcode 3.0 strengthens the IDE's integration with third-party SCM (source code management) facilities. Developers can check files and projects in and out, create new source tree branches, and import and export files to and from the SCM. For those projects that don't call for full-blown SCM and to recover from unintentional mangling of checked-out files, Project Snapshots let you capture the state of a project so that something like a "global undo" can be done after something goes very wrong.

Objective-C gets an upgrade

Objective-C 2.0 is an update to Apple's "official" language for the Mac platform. Apple recognized that the language can impose an intimidating learning curve on C, C++ and Java developers, so it introduced features that are more in line with C/C++ coders' experience.

The greatest of these features is garbage collection. The bane of Mac developers' existence is the need to manually track memory and resource allocation during the course of an application's operation. That becomes a big challenge as objects are passed around by reference. Garbage collection addresses this by automatically freeing resources and allocated memory when they're no longer needed. It takes a toll on performance, but nothing near the penalty imposed by a move to a dynamic language like Java or C#.

Objective-C 2.0 adds a "for" keyword that vastly simplifies enumerating through a collection of objects. It alsoadds object properties, a technique that I came to appreciate in JavaScript that allows the creation of new member variables using object.member syntax.

Taken as a whole, Xcode 3.0 and the updated Objective-C form the foundation of Mac platform development. They continue to welcome existing Mac developers, greatly enhance the experience of developers who embrace the full platform, and bring up developers who are more attuned to the old school of big code and simple editors. The result will be more high-performance native-code applications for the Mac, and that will be a windfall for Mac users post-Leopard.
Reprinted with permission from InfoWorld. Story copyright 2012 InfoWorld Media Group, Inc. All rights reserved.
Our Commenting Policies