Sometimes it's nice to open an interpreter, type out some code and see if it's working, rather than having to compile something large like an Xcode project just to quickly test something. Does an Objective-C Interpreter exist for the Mac, or am I out of luck?
UPDATE: There's a paid program in the App Store called CodeRunner, which lets you run Obj-C quickly (and several other languages). It's not an interpreter, but works pretty well for testing out ideas quickly: http://itunes.apple.com/us/app/coderunner/id433335799?mt=12
Most of the core iOS and MacOs software is still written in Objective-C, though Apple is pushing for new updates to be written in Swift.
Furthermore, Objective-C is a piece of art, creators packed genius solutions and were constantly improving it, so us developers were able to use it at our advantage. There are a lot of indicators telling us there's still a ton of legacy Objective-C code, both from Apple and from other developers, that's still in use.
To sum it up, Objective-C, when compared to Swift, is a more outdated language and lacks modern tools and properties.
Objective-C is the primary programming language you use when writing software for OS X and iOS. It's a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime.
You can use F-Script, which is Smalltalk-based, but lets you interface with Cocoa. You can also embed it in your application, to let you inspect views and other things at runtime. It's quite useful. Edit: as pointed out in the comments, there are other great language bridges available, like PyObjC, RubyCocoa/MacRuby, Nu, etc. CINT is an example of a C interpreter, but not Obj-C.
As for an actual Objective-C interpreter, I don't think one really exists. But it's not too hard to set up a "Command Line Tool" project in Xcode, which gives you a really simple main.m
file to try something in.
For those arriving here late: Take a look at Tosti. A basic but pretty functional Objective-C interpreter.
It's a side-project I put on GitHub as there seems very little available at the moment. I'm using it to do some remote debugging. Support available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With