[antlr-interest] Why Java programmers are more productive...

iank at bearcave.com iank at bearcave.com
Fri Oct 22 10:43:09 PDT 2004



> Well, with all due respect I'm not sure how you can make that
> assertion.  IMO, it depends to a large degree on the individual
> programmer.  If any particular language was significantly easier to
> use, everyone would be using it.  In any case, this is a
> philosophical issue on which we may simply disagree.

  I'm probably going regret jumping into this argument, but the little
  devil sitting on my shoulder is urging me on ("Come on, you know you
  want to do it").

  My background is in compiler design, although I don't do that much
  anymore.  For most of my career I've been a C and then a C++
  programmer.  I've been a core developer on a number of large C++
  projects that targeted a variety of different architectures.  I've
  developed C++ on both Windoz and UNIX (and Linux) systems.  I think
  that I have a pretty good command of C++ (see
  http://www.bearcave.com/software/string/index.html).  I would not
  choose to write an optimizing compiler in Java.  Having written all
  this, I'll also tell you that I am doing most of my development in
  Java these days.

  I do believe that writing software in Java takes less effort.  There
  are two reasons for this:

  1. Garbage collection.

     Garbage collection provides a big advantage in development
     effort.  Many C/C++ errors are memory related and programmers
     must spend noticable effort in memory management.  And yes I know
     that there are C++ garbage collectors, but unless the compiler is
     "garbage collection" aware, they may be unreliable (e.g., they
     leak).

  2. The class libraries.

     Java has the best platform independent class libraries available.
     Period.  I've used the commerical Rogue Wave libraries and I'm
     familiar with STL and the Boost libraries.  C++ simply does not
     have the range of standard libraries available.  This is
     especially true when you combine the libraries available from
     Sun, with those available from Apache and other sources (like the
     XML Pull Parser - see
     http://www.bearcave.com/software/java/xml/treebuilder.html).
  
     When it comes to some areas, like Web services (e.g., servlets,
     HTTP, SOAP), there is simply no competition.  Java just wins
     hands down with support from the Resin and Apache Tomcat Java
     application servers.

     Java also has excellent support for database access via packages
     like JDBC.  If you ever touch a database, most or all of Java's
     performance disadvantages disappear, since the application will
     be bottlenecked by database access.

  There are other issues as well.  The vast majority of programmers
  who write C/C++ code still use arrays as containers, rather than
  using objects.  As a result, half of the software security errors in
  C/C++ are buffer overflow related.  This has literally cost the
  world billions of dollars.  There have been successful security
  attacks on Java, but they are much more difficult.  Java, with its
  enforced memory boundaries is simply a safer language to develop in.
  Java also has the advantage of being built from the ground up with
  security in mind.  Although some of this design may be flawed, at
  least it was considered.

  Ian Kaplan


 
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