02 May

JDK proposal takes aim at verbose Java syntax

    Java would gain records and sealed types capabilities as part of a draft JDK enhancement proposal intended to address complaints that Java is too verbose and requires too much “ceremony” code. The proposal was initiated by Brian Goetz, Java language architect at Oracle.

    Records provide a compact syntax for declaring classes that are transparent holders for shallowly immutable data. Sealed types, meanwhile, offer a means for declaring classes and interfaces that can restrict their subtypes. Combined, these features are sometimes referred to as algebraic data types.

    Share this