 |
 |
|
 |
03-24-2009, 04:17 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Posts: 8
|
Is linear programming possible in Objective-C?
Hello, I develop software for some 25 years. After that time, linear-style programming got so burned in my brain, it is very hard for me to switch to objective programming.
I have read in Tutorials that Objective-C is somehow "backward compatible" with old style programs. Is it possible to use linear programming and minimize use of objective programming in Xcode? For example, can I call methods and properties as some kind of functions?
Jan
|
|
|
03-24-2009, 04:26 PM
|
#2 (permalink)
|
|
Former NeXTStep Developer
Join Date: Mar 2009
Posts: 996
|
Objective-C was originally developed as a pre-processor macro expansion enhancement to vanilla C. Everything it did was converted by the pre-processor into C. So yes, you could (and I think still can) do it all with function calls.
But the syntax to do it is very, very ugly. And you'll need to do it a lot, to make calls to all the SDK APIs. You really, really really don't want to go that route.
Now, it's not that hard to write all your own logic in C or C++, and then just do the API calls in Obj-C. Apple used to have some pretty good examples on mixed programming, at least for Mac OS X. They would probably apply to the iPhone SDKs as well.
Try poking around on the Developer Connection website for examples.
joe
|
|
|
03-24-2009, 08:40 PM
|
#3 (permalink)
|
|
Registered Member
Join Date: Jan 2009
Posts: 38
|
ObjC is backward compatible in the sense that you can call regular C code from within your ObjC.
Depending on the type of app you're writing, you can possibly avoid a lot of the ObjC. But the UI Frameworks (where you get your standardized interfaces) are based on ObjC and you'll be pretty handicapped in this area if you don't learn it.
__________________
iPhoneApps:
Respotter - Worldwide image browsing and messaging.
AutoWeb - Automate your web logins and browsing!
|
|
|
03-24-2009, 09:44 PM
|
#4 (permalink)
|
|
New Member
Join Date: Aug 2008
Posts: 125
|
FYI you mean procedural programming, not linear programming... that means something else completely.
|
|
|
03-24-2009, 11:31 PM
|
#5 (permalink)
|
|
Registered Member
Join Date: Jul 2008
Location: Minneapolis, MN
Posts: 208
|
Hopefully by "linear" you aren't looking for an objective-c equivalent of "GOTO 10"
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 495 |
| 54 members and 441 guests |
| 3DTOPO, ackpth, AjohnB, Alchemda, alon7, amiralic, andrewjak, asimrs, bbc z, beginer2007, bixcoito, bluemonkey, BostonMerlin, BrianSlick, Centurion Games, cornishGeeza, crabFish, dany88, eatenbyrats, embedded, ggalante, gonk, gralem, greenuns, Gudus, healthyutech, iMoan, IphoneSdk, itakenocrud, john855, Kalimba, MarkC, mebarron, MikeBlah, mlfarrell, mriphoneman, MrMattMac, msudan, muallin, nibby, Noise, Oliver Drobnik, PeddlePower, pereorra, pierrephi, pjklimtx, Pring, ryguy2503, StefanL, tcarte04, the1nz4ne, ustech001, wuf810, ZunePod |
| Most users ever online was 779, 05-11-2009 at 10:55 AM. |
» Stats |
Members: 21,510
Threads: 35,794
Posts: 156,817
Top Poster: smasher (2,449)
|
| Welcome to our newest member, dmf1978 |
|