I am coming from Lisp and wish to develop an Iphone app. I was hoping to hear from other lisp or python developes on how Objective-c compares to Lisp in terms of abstractions, such as closures, first class functions, macros, etc.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Objective-C has its history rooted in SmallTalk, and as a consequence, like Lisp, a lot of what makes the language useful exists in functions (in this case, methods of classes) that you can override at runtime with your own code and can add functions at runtime to classes. But, in Objective-C the underlying C is never very far away, so unlike in Lisp you do have to worry about things like memory management and the language is obviously more procedural than functional.
Recently Objective-C compilers added support for “blocks”, i.e. closures.
Of course, Objective-C is still a compiled language and everything that gives it features you would expect to find in Lisp, Python, or SmallTalk is built on top of that. I might get some down votes for it, but given your background I think you’ll find Objective-C to be about the nearest thing to developing in a fully dynamic, interpreted language that you can get right now while with a compiled language.
Just in case you haven’t checked or someone coming along later to read this question needs it, have a look at the Wikipedia section on Objective-C syntax.
As a P.S., depending on what you’re doing you might also be interested in tools like PhoneGap that let you develop for iPhone (and other mobile platforms) in JavaScript, since JavaScript, despite its name and C-like syntax, has a lot of the power you are used to having in Lisp.