News for hackers. Stuff that matters.
Re:Java in the Small by usrusr on Wednesday December 18, 2024 @06:23PM (#42456628)
Isn't that hugely elaborate compared to languages where top level statements are a function, functions return their last statement, and the return value of the entry function is sent to stdout unless invoked in special ways? That print() around the "hello world!" does not appear any less superfluous than all the public static void you can throw at a javac 1.0
Re:Java in the Small by driggs on Wednesday December 18, 2024 @08:08PM (#42457287)
You mean a language like... Python?

  >>> 'hello world'
  'hello world'
Re:Java in the Small by usrusr on Thursday December 19, 2024 @01:29AM (#42458962)
Exactly like that (well, almost exactly: if python includes the quotes then it's not really equivalent to print()).

The point was that by including that print(), people already do say yes to including "like you'd do in a real program" ceremony in their supposedly minimal examples.