Over a million developers have joined DZone.

BiJava: Backwards-incompatible Java

· Java Zone

Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management, brought to you in partnership with Stormpath.

Stephen Colebourne has a great idea: How about creating a version of Java that is not backwards-compatible? That would mean that it could lose some of its weird and/or hard-to-learn features, while still being recognizably Java and without suffering from the feature overload of some of its competitors. Colebourne also lists three features that BiJava (backwards-incompatible Java) should have: no primitives, nullable types, equals operator. Observations:

  • Avoid feature overload: Larry Wall’s oft-cited saying “there is more than one way of doing things” to me is the very definition of bad language design. Scala and Clojure might suffer from this problem (disclaimer: I still don’t know these languages well enough for an informed opinion).
  • Typing method parameters is great: It allows one to do static checking and documents what’s going on. Languages with algebraic types (ML, Haskell) tend to have even more custom types; they even wrap the type where in Java, one would probably use naked strings. A great practice.
  • I would also argue that (a simple version of) closures should completely replace inner classes. They are immensely confusing to newcomers and not needed if you have closures. Smalltalk and (the partially Smalltalk-inspired) Ruby show that closures and object-orientation are not antithetical.
  • Groovy++ looks interesting, sometimes it seems to stray too far from Java (why in hell are semicolons optional?). [As an aside: Groovy++, please get a proper home page, for those of us who are banned from Google Groups.]
  • ABCL (Armed Bear Common Lisp) is also worth checking out. I love their tongue-in-cheek slogan “The right of the people to keep and arm bears shall not be infringed!”. Like Clojure, ABCL is Lisp, but closely emulates Common Lisp which means it is a simpler language.
My own wish lists for Java:

From http://2ality.blogspot.com/2010/10/backwards-incompatible-java.html

The Java Zone is brought to you by Stormpath—a complete, pre-built User Management API. Want to learn how to use JWTs to protect microservices from CSRF and more? Check out this on-demand webinar with our Java Developer Evangelist, Micah Silverman.

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}