Remix.run Logo
flowerthoughts a day ago

The unnamed class approach to global variables sounds nice. You can do hot-reload, but still have unencumbered syntax.

OTOH, since Java files are named after their public class, it would have made more sense to just say the `public class X { }` wrapper is optional and only needed for attributes and inheritance. I don't quite understand why they need an anonymous class.

> The Java compiler will compile that file to the launchable class file HelloWorld.class. In this case the compiler chooses HelloWorld for the class name as an implementation detail, but that name still cannot be used directly in Java source code.

https://openjdk.org/jeps/445