Some languages (e.g., C++) allow the members of a class to be declared separately from their definition, while others (e.g., Java) require just a definition. The consensus is that the primary value of separate declarations is derived when the declarations are stored separately from the definitions -- something that has not been proposed for JavaFX and is presumably inappropriate in the domain it addresses. A secondary benefit would be an uncluttered view of the shape of the class -- but this can be provided by the IDE. The downside of separate declarations is additional work for the programmer to write the member signature in more than one place and maintain them in sync.
Therefore, the consensus is that member definitions should be included within the class definition and that there should not be separate member declarations.
Back to OpenJFX Compiler