Nice NEWS,1.78,1.79
Daniel Bonniot <[email protected]> Mon, 06 Jun 2005 13:43:48 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17146
Modified Files:
NEWS
Log Message:
Reorganization and minor rewrite of recent news.
Index: NEWS
===================================================================
RCS file: /cvsroot/nice/Nice/NEWS,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** NEWS 6 Jun 2005 13:29:50 -0000 1.78
--- NEWS 6 Jun 2005 13:43:44 -0000 1.79
***************
*** 1,11 ****
nice (0.9.11)
! * maybeNull, a counterpart to the notNull, might be used from now on
! to test variables returned from Java libraries without retyping:
let prng = SecureRandom.getInstance("ARCFOUR");
! // Test if a bad implementation has returned null instead of exception.
if(maybeNull(prng) == null) workaround();
! * Nullness analysis of assignments (RFE 681385) is implemented.
It is now possible to write:
Foo func( ?Foo foo ) {
if( foo == null ) {
--- 1,17 ----
nice (0.9.11)
! * maybeNull, a counterpart to notNull, can now be used to inform the compiler
! that a value returned from Java libraries without retyping might be null,
! in order to avoid a warning:
!
let prng = SecureRandom.getInstance("ARCFOUR");
!
! // Test if a bad implementation has returned null instead of an exception
if(maybeNull(prng) == null) workaround();
!
! * Nullness analysis of assignments (RFE 681385) is implemented, so that the
! compiler is more clever about when a value cannot be null.
It is now possible to write:
+
Foo func( ?Foo foo ) {
if( foo == null ) {
***************
*** 15,18 ****
--- 21,25 ----
return foo;
}
+
since Nice will detect that foo can't be null after the "foo = new Foo()",
and will propagate this information outside of "if( foo == null )" checks.
***************
*** 39,53 ****
...
}
* Added instanceof on option types. For instance 'x instanceof ?String'
is equivalent to 'x == null || x instanceof String'.
* Added binary integer literals. Examples: '0B1011' '0b1010_0000_0101_1111'.
* Removed octal integer literals.
- * Some error messages locate more precisely the source of the error.
- * Generated bytecode is slightly more compact and references less "system"
- Nice classes, so that those do not need to be automatically added to
- generated jars.
- * Exit the JVM with exit code 1 when the main program finishes with an
- uncaught exception.
- * Bug fixes (negative int hex literals, ...)
* Automatic message is generated for assertions, containing
the failed expression and location of the failed assertion
--- 46,60 ----
...
}
+
* Added instanceof on option types. For instance 'x instanceof ?String'
is equivalent to 'x == null || x instanceof String'.
+ * Unbounded wildcard type parameters are supported (as in Java 5). This
+ allows to avoid using type parameters when their value is not important.
+ For instance:
+
+ boolean isShort(List<?> l) = l.size() < 10;
+
* Added binary integer literals. Examples: '0B1011' '0b1010_0000_0101_1111'.
* Removed octal integer literals.
* Automatic message is generated for assertions, containing
the failed expression and location of the failed assertion
***************
*** 55,69 ****
or printStackTraceWithSourceInfo wasn't used).
* Forced (always checked) assertions now are available.
! !assert 0==1; // fails always
! ?assert 0==1; // fails if assertions enabled
! assert 0==1; // fails if assertions enabled
! * niceunit supports a --jar option to test jars.
* It is now possible to use Nice "interface" method from Java
(that is, method signatures are preserved in interface bytecode).
! * Unbounded wildcard type parameters are supported (as in Java 5). This
! allows to avoid using type parameters when their value is not important.
! For instance:
!
! boolean isShort(List<?> l) = l.size() < 10;
--
--- 62,80 ----
or printStackTraceWithSourceInfo wasn't used).
* Forced (always checked) assertions now are available.
!
! !assert 0==1; // fails always
! ?assert 0==1; // fails if assertions enabled
! assert 0==1; // fails if assertions enabled
!
! * Some error messages locate more precisely the source of the error.
* It is now possible to use Nice "interface" method from Java
(that is, method signatures are preserved in interface bytecode).
! * Generated bytecode is slightly more compact and references less "system"
! Nice classes, so that those do not need to be automatically added to
! generated jars.
! * Exit the JVM with exit code 1 when the main program finishes with an
! uncaught exception.
! * niceunit supports a --jar option to test jars.
! * Bug fixes (negative int hex literals, ...)
--
***************
*** 73,77 ****
* Better error messages for wrong constructor calls and method
implementations with wrong parameter names.
! * Default value of fields can be overriden in subclasses. For instance:
class A {
int x = 1;
--- 84,88 ----
* Better error messages for wrong constructor calls and method
implementations with wrong parameter names.
! * Default value of fields can be overridden in subclasses. For instance:
class A {
int x = 1;
***************
*** 121,125 ****
The same construct can be used with '!= null' tests.
! * java.lang.Class is now parameterized by the type it represents.
In particular, newInstance is now declared in nice.lang with
--- 132,136 ----
The same construct can be used with '!= null' tests.
! * java.lang.Class is now parametrized by the type it represents.
In particular, newInstance is now declared in nice.lang with
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20