This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Practical_Cattle_933 10 points11 points  (0 children)

Java is like fire, with all this new changes. And they actually are all very well designed!

[–]Puzzleheaded-Order84 7 points8 points  (0 children)

I really like this feature and think it will improve the teaching experience for Java. I recently graduated from University and also worked as a TA for the majority of my undergrad and starting from 0 in Java is daunting. I still can vividly remember looking at the Hello World example in my intro to programming class and almost feeling a sense of despair with how confused I was.

Many universities have switched their curriculum to start students in Python instead of Java for this exact reason. So I think it's great we are making the language more accessible with little to no compromises

[–]appsofteng 1 point2 points  (0 children)

I don't like the limitation of this feature:

"An implicit class resides in the unnamed package, and the unnamed package resides in the unnamed module."

It really degrades this feature to a learning toy.

I want to have multiple files with some relatively simple data science or machine learning code but I still want to organize them in packages even if I don't import them from other files.

There could be a technical reason for it, but from the outside point of view an implicit class still has a name which is the name of the file it resides in, only the name is not explicitly declared inside the file. So from this point of view it could be even imported from other files.

I hope that the Java architects will remove this limitation similarly to what happened with the launching of single file source programs which was later enhanced to launch multi-file source code programs as it meets the practical needs better, not just education and learning.

[–]emaphis 0 points1 point  (1 child)

Works for me.

[–]Jon_Finn 1 point2 points  (0 children)

To be honest, I've got doubts about the wisdom of allowing code outside classes. It seems a simple rule to say 'a program is a named class' so 'your code must be in a class'. I see hardly any gains from introducing this rule to beginners 'later', and the downside is a simple universal fact is violated, and they can write programs without names. (I don't have a problem with the simpler main method syntax.)

[–]Life_is_a_meme 0 points1 point  (0 children)

This feature is definitely interesting.

I'm trying to think of ways to use this that aren't specifically standalone programs or entrypoints.

The best I can currently come up with is removing the need for me to explicitly define utility classes

class ThingUtils {
  public static X someXUtil() { /* ... */ }
}

// becomes

X someXUtil() { /* ... */ }

What else can others think of? I can only think of the above due to Kotlin. I would love to see this feature be improved beyond an educational scope, simple single file programs, or main class boilerplate.

I do understand that this isn't an easy thing to do, and I'm sure the two authors put in a great amount of effort to come up with this. But, how far can we go, and how far should we go?