10 Reasons We Need Java 3.0
Subject:   extensions ?
Date:   2002-08-06 11:54:01
From:   jefu1

I don't believe that either of these counts as a language extension as both would retain backward compatibility, but both would be very good to add.

1) better support for "design by contract", in particular, class invariants (checked only on publicly visible member functions), pre and post conditions in member functions - not using the awkward "assert" but more as in Eiffel or Sather - in particular, it should be able to turn these on and off at compile time on a per class (or even per package) basis.

I'd estimate that using pre/post conditions and invariants in Sather reduced my debugging time by about 90% (and I've used "assert" in both C and C++ with nowhere near the same success).

2) Generators/iterators as in Sather, Icon or recent Python. Enumeration classes don't do quite the same thing as generators in Sather can be defined within a class - and without an extra class to hold the enumeration. My experience with these has been that code size has shrunk by 30-50 percent.

1 to 1 of 1
  1. extensions ?
    2002-08-28 14:33:32  bjsyd70 [View]

1 to 1 of 1