This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Newbie questions


>>>>> "Maury" == Maury Markowitz <maury@oaai.com> writes:

Maury> First and foremost I'm curious about the ability for gcj's
Maury> compiled code to be used as libraries for Obj-C code on top.
Maury> IE, if I were to use gcj and it's associated libs, what sort of
Maury> work effort would it be to have them work as Obj-C libraries?
Maury> Is library format an issue at all? (I'm assuming not, but I'll
Maury> ask to be sure) Is the main issue going to be supplying a
Maury> selection of wrappers in the form of .h files?  It "feels" like
Maury> there is a runtime changed needed to Obj-C, and I'm curious if
Maury> anyone could comment on the level of change needed, if any?

I'm not entirely sure I know what you are asking.

libgcj is just a library like any other library.  It just happens to
be implemented in a miaxture of C++ and Java.  However, it has some
requirements that other libraries probably don't have.  For instance,
it relies on the existence of a garbage collector (this isn't the only
requirement, but it is one of the big ones).

You can use this library from C++ right now.  Using it from ObjC would
require knowing how to make the library bootstrap (not too hard), plus
a knowledge of how to call C++ from ObjC (we've purposely made
compiled Java mostly compatible with compiled C++; I don't know
anything about ObjC so I can't help you there).

Maury> The other question I have relates to extensions and the
Maury> legality thereof.  We Obj-C developers have come to love the
Maury> language's flexibility in terms of "weak" typing and notably in
Maury> the form of categorization.  It seems to me that if you're
Maury> going to native-compile code anyway, extensions like this to
Maury> Java would no longer break it's security orientation.

I think we can do whatever we want, basically.  Of course we'd always
want to provide a way to make the compiler pedantic, just as we do
with C and C++.

However, that doesn't mean I'm necessarily in favor of making any
extensions to the Java language.  I'm pretty sure you'd be on your own
in terms of implementing the changes; there are too many pieces still
missing for us (meaning those of us at Cygnus hacking gcj, or at the
very least just me) to do this sort of thing.  Another factor is that
every extension makes the compiler more difficult to understand and
modify.  I'm told the C++ compiler hackers have found random g++
extensions to be a real pain over time, so this is something to be
wary of.

When you say "weak" typing, what do you mean?
What is categorization?
When you say "proxies", what do you mean?

Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]