4 ms·
> that is you define what happens encapsulated in a class Apart from that it is really unintuitive to have something "static" within a class (which is commonly
by valenterry 5y ago
> that is you define what happens encapsulated in a class
Apart from that it is really unintuitive to have something "static" within a class (which is commonly understand as a template), it is not encapsulated because it is static _and_ public. _And_ now you can search for this thing everywhere - and what happens if you find two of them?
Yeah no, the idea of "public static void main" wasn't a great one, no matter how I look at it.
It's much better to be explicit and ask the user to decide which file they want to use as the starting point.
> Of course implicit imports are needed, like what else would you have without
They are of course not needed. You could also just import everything manually. Okay, Java's import suck, but in a better language you could do "import prelude._" in the beginning of every file and otherwise you are left with keywords only. Not saying that's a great idea, but it certainly can work without implicit imports.