[antlr-interest] build issues: bytecode assembly generation

Don Caton dcaton at shorelinesoftware.com
Fri Oct 22 08:43:37 PDT 2004


Michael:

> was obviously a design decision and I don't think you can 
> make any serious claim that it was a bad decision.

I never made any such claim, serious or otherwise; I was simply asking what
the reason for choosing Java was.  I believe that PCCTS was written in C++
(or C) and wondered why Ter switched to Java for ANTLR.  No criticism or
judgment was made, or intended.

I'm using ANTLR in a commercial compiler product, written in C++, so I'm
well aware of ANTLR's capabilities in that regard.  And I'm delighted with
it, and extremely grateful to Ter (and all the others) for all the work he's
put into it.

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

I haven't the slightest desire to argue about anything; life's too short to
argue about such things.  But like I said in a previous post, when a
roadblock arises because of a fundamental limitation in the language, for me
it raises a question about whether or not the proper language is being used.
I'm not saying (or implying) that it is or isn't, I'm just curious as to why
it is written in Java, especially when it stared out in life in C or C++,
and given the fact that C++ is also very portable.  Just because a question
is raised doesn't mean it should be taken as criticism.  You don't learn
anything unless you ask, right?

Regards,
 
Don Caton
Shoreline Software, Inc.
 

> -----Original Message-----
> From: Tiller, Michael (M.M.) [mailto:mtiller at ford.com] 
> Sent: Friday, October 22, 2004 11:01 AM
> To: antlr-interest at yahoogroups.com
> Subject: RE: [antlr-interest] build issues: bytecode assembly 
> generation
> 
> 
> > 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
> 
> 
> 
>  
> 
> 
> 
> 




 
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