Java's Evolution: A New Dawn for Developers and Students

It is well known that Java has had many special moments in the life of every aspiring developer. While it is adored by many, there are those who consider it outdated. However, most of us can agree that when writing the first lines of code, we didn’t really know what we were doing. We only knew they had to be written in a certain way, otherwise we would have problems with the compiler.

But it seems that the new generation of developers will soon be able to experience the new world that the language is building.

The Dawn of a New Java

User Ron Pressier has made a proposal that allows for a completely different and highly practical way to instantiate the main method.

His main idea is to help students and teachers in learning programming. Currently, it is necessary to understand the theory behind object-oriented programming, which can be overwhelming or even completely off-topic when dealing with the most basic concepts.

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Traditional way of implementing a class in Java

Therefore, as the author mentions, it would be more practical to be able to instantiate classes anonymously, as this would eliminate unnecessary information overload and allow students to focus on what they are really doing.

void main() {
    System.out.println("Hello, World!");
}

A proposal by the author to address the problem.

It may seem crazy in some cases, and one might even think they are writing code in C++. However, its advantages are quite clear: it would allow the student’s learning curve to be completely incremental, and gradually transition from functional programming to object-oriented programming.

class HelloWorld {
    void main() {
        System.out.println("Hello, World!");
    }
}

A second proposal has been presented that, although it still involves concepts like classes, is much more understandable for the student.

Although it is still in the “candidate” phase, I wouldn’t be surprised to see its approval being immediate, as I have noticed that many people on the internet and my colleagues are talking about the great potential this represents.

In my opinion, it is important for us as developers to give as much visibility as we can to these types of proposals. This way, we can ensure that the next generations of programming students can enjoy a more efficient and enjoyable learning process, which can be crucial in fostering interest and passion for software development.

References

https://openjdk.org/jeps/445