KSL: Reflection's orthogonality improvement

Alex Buckley alex.buckley at oracle.com
Mon Oct 12 19:00:21 UTC 2015

There have been many suggestions over the years for some symbology in
the Java language to denote reflective operations over classes and
members. The underlying desire (often unstated) is a metaprogramming
facility in the language that allows abstraction over classes and
members. However, Java decided long ago to solve this problem with
metaDATA in the language -- annotations -- and leave the metaPROGRAMMING
part to ordinary programs that use the reflection or language model APIs
to read annotations -- frameworks like JPA and Dagger.

It's easy to say that metaPROGRAMMING is "obviously" the right thing and
that metaDATA is a poor relation -- in which case I urge a viewing of
"Stewardship: The Sobering Parts", particularly "The
Obvious Way is Often Wrong" at https://youtu.be/2y5Pv4yN0b0?t=28m40s.

Of course this is not the list for protracted discussion of language 
design philosophy, and in any case the "Kitchen Sink Language" is a 
concept from another era, but I thought some wider context might be helpful.


On 10/12/2015 3:58 AM, bsrbnd wrote:
> Hi,
> Just an idea for the "Kitchen Sink Language".
> I hope this subject hasn't already been discussed and that I haven't missed
> anything in the quite big and complex JLS.
> It's said not to think too much if this is a good or bad idea before
> submitting it for the KSL, but I hope I've thought enough...;-)
> Any comments, ideas or suggestions are welcomed.
> No implementation draft has been done until now, but it could be explored
> if comments are encouraging...
> Thanks in advance,
> bsrbnd

More information about the compiler-dev mailing list