Version 0.6 features

69 views
Skip to first unread message

inder

unread,
Nov 9, 2010, 3:03:49 PM11/9/10
to java2objc
Lets use this thread to capture the features we would implement for
the next version, 0.6.

Dave

unread,
Nov 10, 2010, 11:06:30 AM11/10/10
to java2objc
I committed a todo.txt that includes the following things I wanted to
support in some vague future release. Here they are, better-described
than in todo.txt and with one additional item:

* mappings.properties allows a "struct" type to be declared. It's
currently used for non-pointer things like "int" but it would be
better if it could support generating structs from Java classes. All
members would become public, and all methods would be changed into
external C functions with an explicit "this" argument.

* When an object is created it is in the form of [[[MyObject alloc]
init] autorelease]; This is fine when assigning to something that
retains it (like a NSArray or a property) or when returning the
object, but is not fine when assigning directly to a field. Java2objc
should detect assignment of new objects to fields (as opposed to
properties), and remove the call to autorelease.

* Currently all static field initializations are done in-line, like
Java does it. In many cases this won't compile in Objective-C.
Java2objc should be made smart enough to move these initialization
expressions into a static + (void) initialize function.

* Perhaps detect Java's finalize method and merge with Objective-C's
existing dealloc method. However for GCed Objective C the method
should still be finalize. Perhaps a program argument could be used
for this.

* Support for renaming methods via mappings.properties is very basic--
it works only on the method name and so it doesn't support
overloading. In addition any portions of the Objective-C selector
(i.e. named parameters) are not supported. We should support
overloaded methods and Objective-C named parameters.

Now for the bad news. Since my application is now fully ported I have
less motivation to work on java2objc. I can probably work on some of
the above features but it will probably be casually or when someone
demonstrates a need.

-Dave

inder

unread,
Nov 10, 2010, 2:28:11 PM11/10/10
to java2objc
I have added the notes from todo.txt to the java2objc roadmap page.
No issues regarding reducing your involvement in the project. I myself
have other projects going on that keep me busy. I see myself coming to
back to java2objc in a couple of months.

Thanks again for your contributions.
Inder
Reply all
Reply to author
Forward
0 new messages