3 ms·
For me the most interesting thing here is the rejection of direct compilation to native code via LLVM. This team has concluded that the safest and most practica
by mwcampbell 11y ago
For me the most interesting thing here is the rejection of direct compilation to native code via LLVM. This team has concluded that the safest and most practical way to target Apple's platform is using one of Apple's compilers (in this case, clang).
I'm not sure if I agree with that conclusion. After all, RubyMotion and the Elements Compiler (www.elementscompiler.com) have kept up with all the new compiler requirements from Apple, including the requirement to emit bitcode for watchOS and tvOS. So clearly it's possible. And using LLVM directly, rather than using C as an intermediate representation, yields more control over debug information. Still, it's possible that at the next WWDC, or even next September, Apple will drop something new that will force us to use one of their compilers.
- marktangotango 11y agoThere's a quote in the readme.md concerning robovm and difficulty migrating to ios9, FYI.
- invalidname 11y agoPossible != Easy. There are quite a lot of guys who took that path and its totally possible. Unfortunately a great example of what can go wrong is now available with RoboVM, this turned out to be such a huge effort to maintain that they literally closed their source. Now the OSS community is trying to fork the code and because the code is so complex its really hard to do that. Even if Codename One goes belly up or is acquired by a closed source company in the future you will probably be able to still work with the code without a problem. There are a couple of other advantages with this approach: 1. Use the native tooling (e.g. profilers etc.) which are pretty amazing on iOS. 2. Just write Objective-C/SWIFT code for various features. This is hugely convenient when adopting features from the latest version of iOS.
- frik 11y agorelated HN topic "RoboVM Is No Longer Open-Source": https://news.ycombinator.com/item?id=10498635 https://news.ycombinator.com/item?id=10498635
- praseodym 11y agoNeither do I. Compiling to LLVM IR will enable Apple's tooling to generate correct binaries for the platform (actually nowadays Apple will do it for you through the use of LLVM bitcode for App Store submissions). There's still an issue of using the correct iOS APIs for the job, but that issue is certainly also there when compiling to C code. Neither do I agree with the statements about C code being "easier to use"; it is still generated code and it will most likely not be the nicest code to work with.
- invalidname 11y agoYou can open it in a debugger. C is something pretty much every developer knows and has a ton of documentation. LLVM is nicely documented but not exactly in that league. Its more like working with Java bytecode, possible not trivial. E.g. if you have a bug in the LLVM translation code, good luck tracking that... With ParparVM just open it in the debugger and see what went wrong. Look at the referenced quote in the readme from a guy actually going thru the LLVM path (CEO of RoboVM). Its theoretically easy but in all practicality its pretty far from easy and you have no way of knowing what Apple will do with LLVM in the future. But they pretty much guaranteed they will support C as its an officially supported language.