Mac Format - - GET MORE FROM APPLE -

Ap­ple calls its new pro­gram­ming lan­guage “Ob­jec­tive-C with­out the C”. How­ever, Swift is, de­signed to run along­side Ob­jec­tive-C and al­low de­vel­op­ers to switch eas­ily be­tween the two. They can add Swift code to ex­ist­ing apps built with Ob­jec­tive-C. Swift is de­signed to al­low de­vel­op­ers us­ing Ap­ple’s Co­coa and Co­coa Touch tech­nolo­gies to write code more ef­fi­ciently and with fewer er­rors.

Ac­cord­ing to Ap­ple’s Se­nior Vice Pres­i­dent of Soft­ware En­gi­neer­ing, Craig Fed­erighi, Swift en­ables a level of “in­ter­ac­tiv­ity in devel­op­ment that you’ve never seen be­fore on a plat­form”.

One way it does that is through what Ap­ple calls Xcode Play­grounds, which in­stantly dis­play the out­put of Swift code.

Swift’s syn­tax (the struc­ture and for­mat­ting of code) is much cleaner and sim­pler than Ob­jec­tive-C. So, for ex­am­ple, to dis­play “Hello, world!” on-screen us­ing Swift, you would only need to type: println("Hello, world!"). One of the ways in which Swift is safer than Ob­jec­tive-C, par­tic­u­larly for new pro­gram­mers, is that mem­ory al­lo­ca­tions are man­aged au­to­mat­i­cally.

Per­haps the big­gest ben­e­fit Swift brings is that it al­lows those who have never pro­grammed be­fore to start writ­ing OS X and iOS apps with­out the need to learn a lan­guage as com­plex as Ob­jec­tive-C. There are lots of guides avail­able for the lan­guage, in­clud­ing Ap­ple’s own – which is a free down­load from the iBooks Store. And any­one who has ever writ­ten Python code will have a head start.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.