Hacker News new | ask | show | jobs
by flowerlad 1866 days ago
> Explaining to students what public static void main means is pretty annoying and seeing cryptic syntax littered everywhere does not help students when they’re first learning.

C# has solved that with "top level statements" [1]. If Java added that then problem solved, right? It's a simple addition.

[1] https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh...

1 comments

C# would be a better choice. In addition to top-level statements, the standard API seems much less "dogmatically" OOP. Reading a file is just one static method away. Unfortunately, it's still not possible to have top-level functions, right?
But C# on the other hand is a very very complex language, with almost double the keywords compared to Java.
Yes, but I think the learning curve matters more, especially for students who are going to be mostly writing code, not reading existing projects.