5

is there something new about programming apps for iphone with scala?

Do you have some experiences with programming scala apps for iphone?

Thanks for any help!

Alex
  • 8,518
  • 4
  • 28
  • 40
  • 1
    As the situation currently stands I don't think it's possible, certainly not without an immense amount of effort. You'd need to be able to bundle a non-existent JVM in your application and have bindings to all the appropriate libraries. The only thing that could help would be LLVM, but I'm not sure how useful the current Java bytecode converter would even be. There is a Scala-LLVM project I believe, but that's very early IIRC. – Sean Parsons Jul 09 '11 at 12:44
  • 1
    @Stas Wise words by Steve ... not. – Marcelo Jul 09 '11 at 13:16
  • @Marcelo Hernández Rishmawy, they mean that iphone doesn't have jre. Only this. – Stan Kurilin Jul 09 '11 at 13:19
  • 4
    I wonder if you could target Microsoft .NET CLR (Scala's compiler supports this) and use MonoTouch to finish the job... – Mark Elliot Jul 09 '11 at 14:15
  • Mark Elliot, that sounds very intriguing. – Bill Jul 09 '11 at 19:45
  • Is Scala's .NET backend considered production-ready? – Bill Jul 09 '11 at 19:45
  • Here's my answer: http://stackoverflow.com/questions/743172/is-scala-net-production-ready – Bill Jul 09 '11 at 19:46
  • You should take a look at XMLVM: http://www.youtube.com/watch?v=s8nMpi5-P-I – Madoc Jul 09 '11 at 23:20

1 Answers1

5

It will be very difficult to make this happen. There's no JVM on the iPhone and it's probably too big to package it with your app.

There's work being done on an LLVM backend for Scala. Since there are code generators for the iPhone for LLVM, this is a path forward, but the backend is still a proof of concept, we still need a way to invoke Cocoa code from Java (not sure if something like that exists) and the Java standard library would need to be ported over as well.

But this would definitely be an excellent thing if it ever happens. Coding in Objective-C is definitely nowhere near as nice as coding in Scala.

Bill
  • 44,502
  • 24
  • 122
  • 213