One nice feature to put in the language, is some kind of contract sintax. Like the one used in Contract4J: http://www.ibm.com/developerworks/java/library/j-aopwork17.html
You already have the null check, but I think this could be extended to a more generic contract sintax!
Contracts will complement the immutable concept. Contracts will provide good and stable API's / Pods. Also, contracts must appear in the docs.
brianSat 26 Mar 2011
I have mixed feelings about the whole design by contract thing. I think the primary constraint that everyone in Java-land has to document and check for was null - we've removed all that boiler plate. Beyond that I personally like checking my constraints in code and just throwing ArgErr. Although someone could probably build a pretty cool design by contract plugin with DSLs.
shumy Fri 25 Mar 2011
One nice feature to put in the language, is some kind of contract sintax. Like the one used in Contract4J: http://www.ibm.com/developerworks/java/library/j-aopwork17.html
You already have the null check, but I think this could be extended to a more generic contract sintax!
Contracts will complement the immutable concept. Contracts will provide good and stable API's / Pods. Also, contracts must appear in the docs.
brian Sat 26 Mar 2011
I have mixed feelings about the whole design by contract thing. I think the primary constraint that everyone in Java-land has to document and check for was null - we've removed all that boiler plate. Beyond that I personally like checking my constraints in code and just throwing ArgErr. Although someone could probably build a pretty cool design by contract plugin with DSLs.