Live data from Hacker News

J2ObjC: A Java to iOS Objective-C translator by Google

google-opensource.blogspot.co.uk

1–10 of 13 posts

Re: J2ObjC: A Java to iOS Objective-C translator by Google

#3
Its a joke. It translates Java to Objective-C code without GC support (uses reference counting which you need to annotate). It doesn't define any UI so effectively you need to work on a Mac just without all the wonderful tools for UI building that apple provides and without any of the WORA you get from Java. When something doesn't work you are still stuck debugging in Objective-C. And googling stack overflow trying to understand how to translate Objective-C code to your problem.

Codename One solves all of the above issues by giving "actual WORA" which is the true value of Java.

Re: J2ObjC: A Java to iOS Objective-C translator by Google

#4

Its a joke. It translates Java to Objective-C code without GC support (uses reference counting which you need to annotate). It doesn't define any UI so effectively you need to work on a Mac just without all the wonderful tools for UI building that apple provides and without any of the WORA you get from Java. When something doesn't work you are still stuck debugging in Objective-C. And googling stack overflow trying t…

Isn't GC deprecated in favour of ARC?

Re: J2ObjC: A Java to iOS Objective-C translator by Google

#5

Its a joke. It translates Java to Objective-C code without GC support (uses reference counting which you need to annotate). It doesn't define any UI so effectively you need to work on a Mac just without all the wonderful tools for UI building that apple provides and without any of the WORA you get from Java. When something doesn't work you are still stuck debugging in Objective-C. And googling stack overflow trying t…

What's a WORA?

This is just a good start is all.

Re: J2ObjC: A Java to iOS Objective-C translator by Google

#6
post #5

Its a joke. It translates Java to Objective-C code without GC support (uses reference counting which you need to annotate). It doesn't define any UI so effectively you need to work on a Mac just without all the wonderful tools for UI building that apple provides and without any of the WORA you get from Java. When something doesn't work you are still stuck debugging in Objective-C. And googling stack overflow trying t…

What's a WORA? This is just a good start is all.

Write Once, Run Anywhere.

Re: J2ObjC: A Java to iOS Objective-C translator by Google

#8
post #4

Its a joke. It translates Java to Objective-C code without GC support (uses reference counting which you need to annotate). It doesn't define any UI so effectively you need to work on a Mac just without all the wonderful tools for UI building that apple provides and without any of the WORA you get from Java. When something doesn't work you are still stuck debugging in Objective-C. And googling stack overflow trying t…

Isn't GC deprecated in favour of ARC?

Nope. ARC is just slightly better pools but its no GC alternative and won't work with Java code. Java can't be used without a GC so these guys came up with special annotations for reference counting which is very iOS specific. So essentially you write Objective-C code in Java, I fail to see the benefit here? You have to learn objective-c anyway and use all of the toolchains from Apple. So why add an extra step and not go directly to Objective-C? The benefit of a solution like Codename One is clear, it allows you to forgo Apple's tools almost entirely and work exclusively in Java (which I personally prefer to Objective-C).

Re: J2ObjC: A Java to iOS Objective-C translator by Google

#10

Its a joke. It translates Java to Objective-C code without GC support (uses reference counting which you need to annotate). It doesn't define any UI so effectively you need to work on a Mac just without all the wonderful tools for UI building that apple provides and without any of the WORA you get from Java. When something doesn't work you are still stuck debugging in Objective-C. And googling stack overflow trying t…

Well, nearly everything you said about J2ObjC is incorrect.

1. You can use ARC with J2ObjC. Your other comment about it not being supported is incorrect.

2. If you're not using ARC, then no, annotations are not required to get reference counting. The annotations are for "weak references" and are optionally available to avoid cyclic reference problems. They are not used in most cases.

3. You're not stuck without the Apple UI tools; in fact, you are encouraged to use Interface Builder for your UI.

Source: I worked on J2ObjC for Google this summer.

Post reply on HN