[antlr-interest] philosophy about translation

Loring Craymer lgcraymer at yahoo.com
Wed Nov 1 20:18:33 PST 2006


Somehow, I think that utility should be the measure of
greatness rather than popularity.

--Loring

--- Andy Tripp <antlr at jazillian.com> wrote:

> Anthony W. Youngman wrote:
> 
> > In message <4548F943.7070906 at jazillian.com>, Andy
> Tripp 
> > <antlr at jazillian.com> writ
> > I wouldn't describe "popular" as "great".
> 
> I would say popularity is a pretty good indicator or
> "greatness". By 
> "popular", I mean "widely seen
> as good from a technology point of view". So Java is
> "popular" that way: 
> a lot of people use it
> because of its technical merits. COBOL is widely
> used, but almost no one 
> uses it because of its
> technical merits.
> 
> >> Well, I think Java is far better than C++, and I
> think the vast 
> >> majority of programmers who know both
> >> agree with me. Probably the main benefit is that
> it's easy to use for 
> >> "average programmers". That's also why
> >> ANTLR is better than the competition - because
> it's easier to use.
> >>
> > You've just said Java doesn't have pointers. So
> how do you access a 
> > hardware register in Java? How do you access a
> screen buffer?
> 
> You access them indirectly. Leave the underlying
> details to a lower layer.
> 
> >> Yes, a few people want to add stuff back, but
> most do not. It's just 
> >> that the few are very vocal.
> >> The vast majority don't want MI, operator
> overloading, or built-in 
> >> AspectOrientedDesign.
> >> And of course, those who want them think they're
> "above average", but 
> >> then so does almost
> >> everyone.
> >>
> > What about those who don't WANT those things, but
> NEED them?
> 
> Every time I've heard anyone say they NEED MI,
> operator overloading, or 
> Aspects, I've thought
> that they really don't need them, they're just not
> good enough 
> programmers to see a clean way
> to do without them. I've been programming for 25
> years without ever 
> NEEDING any of these,
> and so have most other programmers.
> 
> >
> >>>
> >>>> And that's why Java is popular and Smalltalk
> and LISP are not.
> >>>> It's also why people prefer Java over C++.
> >>>>
> >>>
> >>> It is a easier tool to use. Less powerful. But
> easier.
> >>>
> >> Right - so I hope there's nothing wrong with me
> pushing to make ANTLR 
> >> (or some successor)
> >> easier to use. A compiler is easier to use than
> compiling by hand, 
> >> but also less powerful.
> >> I'm ok with that.
> >>
> > So - you're quite happy to see Antlr crippled to
> suit you, ignoring 
> > the NEEDS of those who need its power!
> 
> Don't worry, I can't cripple ANTLR.  But yes, I'd be
> happy to see ANTLR4 
> become a "crippled" version,
> in the same sense that Java is a "crippled" version
> of C++.
> 
> >>>
> >>>
> >> But required knowledge of the tool's internals
> limits the "average" 
> >> user's productivity.
> >> If I had done AST-based translation, I'd be
> spending way to much time 
> >> worrying about the details
> >> of the AST, rather than the syntax and semantics
> of the two 
> >> languages. I demand to spend 95% of
> >> my time on *what* to do, rather than *how* to do
> it. With ASTs, I 
> >> found myself spending
> >> 95% of my time on *how*.
> >>
> > In other words, as you said earlier, ASTs are the
> wrong tool for you. 
> > So you seem happy to delete ASTs from Antlr
> because *you* don't need 
> > them, irregardless of what other people *NEED*.
> 
> Yes, just as I railed against operator overloading
> and MI in C++, and 
> found bliss in Java.
> I don't much care that other people think they
> *NEED* MI. They can 
> always stick with C++.
> 
> >>>
> >> Right, so you're just like the rest of us. You've
> chosen to limit 
> >> your own "power" by using Java rather
> >> than, say, assembly. So I'm sticking with my
> claim that
> >> "I think a tool can be great while being simple
> enough for most 
> >> programmers (e.g. Java)."
> >> and not buying your "Not without limiting it's
> power" reply.
> >>
> > To my mind, that's not a "great" tool. As I said
> above, "popular", maybe.
> 
> Right, so let's just agree to disagree on that. If
> we can't agree that 
> Java is "greater" than assembly,
> we won't agree on much else.
> 
> >
> > Let's ask a question ... how can a tool be "great"
> if it *relies* on 
> > other tools even for its existence?
> 
> Sure, of course! Virtually all software relies on
> other tools 
> (compilers, operating systems, etc) for their
> existence.
> 
> >
> > A C compiler can compile itself. Can a Java system
> build itself? How 
> > much of Java is actually written in Java? (Oh and
> I'm including the 
> > supporting libraries here!)
> 
> Almost all of Java is written in Java. The only part
> that's not is the 
> lowest layer, which is OS and hardware specific.
> 
> >
> > Antlr v3 is due to be rewritten in Antlr v3. To my
> mind, that's a 
> > "necessary but not sufficient" condition for
> greatness.
> 
> Wow. Only software that's written in itself can be
> "great"? Are you 
> really saying that?
> 
> >>>
> >>>
> >>> He _is_ using a DSL you created to encode
> source-to-source 
> >>> transformations.
> >>> You just expressed the opinion that he has
> aquired the domain expertise
> >>> required to use your DSL.
> >>>
> >> Yes, so if you believe me when I say that my DSL
> is orders of 
> >> magnitude easier to use than
> >> to use ANTLR to build and walk ASTs, then you
> must see my point: He's 
> >> much more productive.
> >> So I'm building my DSL (and other code) on top of
> ANTLR/lexer. I 
> >> think there's an opportunity
> >> for Terence to build a better and different tool
> in place of the 
> >> ANTLR/parser - one that doesn't
> >> require users to know formal language theory or
> picture ASTs in their 
> >> heads.
> >
> >
> > But what if the problem can only be specified in
> terms of formal 
> > language theory? 
> 
> Then you'd have a different situation. But surely
> you're not saying that 
> a language-to-language translator
> 
=== message truncated ===



 
____________________________________________________________________________________
Want to start your own business? Learn how on Yahoo! Small Business 
(http://smallbusiness.yahoo.com) 



More information about the antlr-interest mailing list