[antlr-interest] build issues: bytecode assembly generation

Tiller, Michael (M.M.) mtiller at ford.com
Fri Oct 22 08:01:28 PDT 2004


> From: Don Caton [mailto:dcaton at shorelinesoftware.com]
> Subject: RE: [antlr-interest] build issues: bytecode assembly
generation
> 
> 
> 
> Terence:
> 
> I haven't been a subscriber to this list for too long, so forgive me
if
> this
> has already been discussed, but...
> 
> Why did you write Antlr in Java in the first place, and why are you
> fighting with these issues?

This is two questions.  The first, "why did you write ANTLR in Java in
the first place" is a non-question.  There are many good reasons to have
written it in Java and there are many good reasons to have written it in
other language.  It was obviously a design decision and I don't think
you can make any serious claim that it was a bad decision.

Now the "why are you fighting with these issues" question implies that
somehow this bytecode issue could have been foreseen somehow and that it
condemns the original "why Java" decision making process.  The reality
is that what Terence is trying to do is optimize something and compiling
it into bytecode isn't the only way but it is an efficient way to handle
it.  Java (the language) isn't such a serious impediment here that it
negates all the reasons for choosing Java.  More philosophically, every
language has its drawbacks.  Recognizing this, it is always possible to
say "Why did you write ANTLR in XYZ in the first place, and why are you
fighting these issues".  For each value of "XYZ" there WILL BE issues.
It is inescapable.

All that being said, I have a C++ background and I've used the C++ code
generator in ANTLR.  If you want to use ANTLR with C++ YOU CAN DO THAT.
ANTLR's code generation is completely separate from the "compiler
compiler" tool (which happens to be written in Java).

I've personally switched from C++ to Java recently for many reasons and
from my perspective, Terence has done an excellent job of both serving
the needs of the community while simultaneously developing some great
technology all in a relatively language agnostic way.  So I don't think
there is any merit to criticizing any of his significant design
decisions.

> C++ is at least as portable as Java and it has no
> runtime to impose limitations that get the way of what you need to do.

I used to think this way up until recently and now I don't.  It is all a
matter of perspective.  Again, ANTLR doesn't prevent you from writing in
C++ so you really can have it both ways.

> I'm not anti-Java, but I don't see what benefits it brings to the
> table over C++, at least not for this kind of programming task.

Rather than argue with you about it all I can say is "then use C++".

> Don

--
Mike



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list