|
|
|
|
|
by usrusr
1353 days ago
|
|
Instantly my mind wants to "javaify" it again, that is, generalizing it to some general case by involving qualified names: Instead of stubbornly implementing Runnable from those flat files, mix in the well-established concept of single-function-interfaces (Runnable is just one of many) and introduce a top-level "extends" that makes the file body an SFI implementation: extends java.lang.Runnable;
java.lang.System.out.println("Hello world");
(and it only gets better if you also add the rule "in absence of any imports statements, an implicit import java.lang.*; is added) |
|
BTW, I think the pedantic view on this based on the (mailing list discussion) is that it becomes java.lang.StaticImports.println("Hello"), which calls System.out.println.