[TO]What's the big deal with EJB? [Re: PEP scepticism]

Nick Efford nde at comp.leeds.ac.uk
Fri Jul 6 08:21:11 EDT 2001


On Thu, 5 Jul 2001 17:10:28 +0200, Alex Martelli <aleaxit at yahoo.com> wrote:

> From my personal experience: I get roughly a 15-20% increase of
> productivity in Java.  Lack of templates (standard C++ library
> and others) is BY FAR what I miss most in Java, reducing whatever
> the gain would be if Java had them back down to such 15-20%
> gains.  Other less-important lacks that hurt my productivity
> in Java wrt C++ are multiple inheritance, auto-destructors
> (having to code try/finally &c instead), and to some extent
> slower recompile/rerunalltests cycles due to Java performance
> in the second half of that cycle.

I also find that I tend to be a bit more productive in Java
than in C++.  However, I think that the benefits of having such
high-level, application-oriented class libraries as standard
are reduced somewhat by the sheer verbosity of the language -
e.g. in things like I/O.

Cay Horstmann's comparison of C, C++ and Java springs to mind:

C:

  printf("%10.2f", x);
     
C++:

  cout << setw(10) << setprecision(2) << showpoint << x;
     
Java:

  java.text.NumberFormat formatter
   = java.text.NumberFormat.getNumberInstance();
  formatter.setMinimumFractionDigits(2);
  formatter.setMaximumFractionDigits(2);
  String s = formatter.format(x); 
  for (int i = s.length(); i < 10; i++)
    System.out.print(' '); 
  System.out.print(s);

The equivalent Python code is very similar to the C example,
of course.


Nick




More information about the Python-list mailing list