News for hackers. Stuff that matters.
Re:Native UIKit iPhone Apps Written In Lua by tumult on Thursday October 01, 2009 @01:44AM (#854390)
Check out MacRuby and some of the Obj-C bridges for other languages (MacRuby isn't bridged though), you'll be pleasantly surprised.

You still start out with the same set of classes and methods as in Cocoa+Obj-C, but how you abstract on top of it can be radically influenced by the language you're using.

Lexical scoping with real anonymous functions, for example, is a huge win. It catches Obj-C up to the 70s, at least :)

Re:Native UIKit iPhone Apps Written In Lua by cesare on Thursday October 01, 2009 @02:14AM (#854419)
Yes, MacRuby is something slightly different.

Still, I would suggest people who are seriously interested in developing for the iPhone to check if plain Objective-C works for them, first.

My recipe is:

- Objective-C for the minimum necessary to deal with the iPhone specific APIs.

- plain C for critical parts which need to be optimized for speed and memory consumption.

- your favorite embeddable language implementation (mine at the moment is TinyScheme, but I've also used Lua) for scripting.

Also, consider that often you may need to include libraries written in c or c++. This is trivial to do from Objective-C.

Re:Native UIKit iPhone Apps Written In Lua by tumult on Thursday October 01, 2009 @03:35AM (#854500)
Yes, I actually agree with you. Especially iPhone is a little ways off from being suitable for a scripting language.
Re:Native UIKit iPhone Apps Written In Lua by davidw on Thursday October 01, 2009 @04:22AM (#854536)
No it isn't. As I said below, Hecl works fine on phones much slower than the iPhone. Ok, you don't want to do a big, huge complex app in a dynamic language, but they would be just fine for quick one-offs. Just like with regular computers...
Re:Native UIKit iPhone Apps Written In Lua by tumult on Thursday October 01, 2009 @04:56AM (#854558)
Yeah, but that's not very interesting, so I don't include it :)

You can do big complex apps in dynamic languages though. But iPhone is a somewhat restricted environment (not THAT restricted, really) where you are encouraged to use as small a footprint as reasonably possible.

Re:Native UIKit iPhone Apps Written In Lua by davidw on Thursday October 01, 2009 @06:40AM (#854672)
> Yeah, but that's not very interesting, so I don't include it :)

Stuff like PHP indicates that plenty of people are quite happy to do quick one off's. Or Tcl/Tk for Unix, or VB for Windows. Scripting is a very sensible idea, and phones are quite capable of handling it these days.

I think it's extremely interesting creating something that opens up development to more people.

Re:Native UIKit iPhone Apps Written In Lua by tumult on Thursday October 01, 2009 @06:56AM (#854682)
The ends and the means are not necessarily the same thing!

I would rather teach a new programmer Scheme, Python, Ruby etc than PHP, VB, etc.

Re:Native UIKit iPhone Apps Written In Lua by davidw on Thursday October 01, 2009 @08:37AM (#854800)
Sure, those languages are better, but the point is making programming more accessible to more people (something Python has done quite well too, indeed).