Paving the on-ramp to Java
openjdk.org
Paving the on-ramp to Java
1–10 of 156 posts
Re: Paving the on-ramp to Java
#2E.g. Foo.java
println("foo")
Becomes: class Foo implements Runnable {
void run() {
System.out.println("foo");
}
}
Then running java Foo.java instead just stubs a main() that looks like: class Main {
void main() {
new Foo().run();
}
}Re: Paving the on-ramp to Java
#3I don't think you need to understand every single character of your very first program right from the beginning. A few of the concepts can be hand waved away to be explained in a later chapter without impeding the overall understanding of programs once you left the sub-twenty-lines beginner programs.
Re: Paving the on-ramp to Java
#4Re: Paving the on-ramp to Java
#5This seems to be a weird micro-optimisation. While I agree with some of the goals (classless files, parameterless main exist in Kotlin and are nice to have), they should, in my opinion, not be implemented for the sole purpose of making `main` as minimal as possible. I don't think you need to understand every single character of your very first program right from the beginning. A few of the concepts can be hand waved…
Re: Paving the on-ramp to Java
#6Doesn't Groovy ( https://groovy-lang.org ) achieve much of this? I remember being taught with it at university for some time before they introduced Java. With Groovy you don't need the class or main method, and can have a program which is just `println "Hello world!"`.
Well no, because that on-ramps you to Groovy, not Java.
Re: Paving the on-ramp to Java
#7Doesn't Groovy ( https://groovy-lang.org ) achieve much of this? I remember being taught with it at university for some time before they introduced Java. With Groovy you don't need the class or main method, and can have a program which is just `println "Hello world!"`.
Re: Paving the on-ramp to Java
#8Doesn't Groovy ( https://groovy-lang.org ) achieve much of this? I remember being taught with it at university for some time before they introduced Java. With Groovy you don't need the class or main method, and can have a program which is just `println "Hello world!"`.
Groovy is not Java.
Re: Paving the on-ramp to Java
#9This seems to be a weird micro-optimisation. While I agree with some of the goals (classless files, parameterless main exist in Kotlin and are nice to have), they should, in my opinion, not be implemented for the sole purpose of making `main` as minimal as possible. I don't think you need to understand every single character of your very first program right from the beginning. A few of the concepts can be hand waved…
Re: Paving the on-ramp to Java
#10This seems to be a weird micro-optimisation. While I agree with some of the goals (classless files, parameterless main exist in Kotlin and are nice to have), they should, in my opinion, not be implemented for the sole purpose of making `main` as minimal as possible. I don't think you need to understand every single character of your very first program right from the beginning. A few of the concepts can be hand waved…
Extra language specification rules that you need to be aware of for your whole career... in order to make the first 30 seconds easier when looking at hello-world for the first time.
For me it seems like a reaction to JavaScripts and Pythons of this world, optimizing for Hello World just to win over them on those 30 seconds.
They are going to rewrite their applications anyway, when performance comes knocking on the door.