Java's verbosity gets old pretty fast. Especially after seeing what's possible with other JVM languages.
Kotlin is a joy to use, in part because of how expressive yet succinct it is. Going back and forth between the two makes Java's flaws much more visible, unfortunately.
To each his own haha, I love Java for how verbose it is and really dislike Kotlin. Operator overrides are a really neat idea but I can't get over the fun/func craze of using it instead of just saying function. Swift, Go, Rust, they all do it.
I agree with you on the fun part. I've been getting more into JavaScript recently and I can see the use of the full word (function) being better for beginners overall.
there's a readability factor that I feel is added when you use the whole function. Especially for compiled languages, the "less characters" argument has no weight at all.
Rust goes like: Fn... And I don't think there's anything wrong with writing instead of function, with good syntax highlighting there's barely a difference. I don't think code becomes any more readable by writing longer words. And Java's verbosity doesn't increase the readability at all. "final public static void" Btw you don't even have a function keyword in Java and nobody tends to make a problem of it.
Java's verbosity gets old pretty fast. Especially after seeing what's possible with other JVM languages.
Kotlin is a joy to use, in part because of how expressive yet succinct it is. Going back and forth between the two makes Java's flaws much more visible, unfortunately.
To each his own haha, I love Java for how verbose it is and really dislike Kotlin. Operator overrides are a really neat idea but I can't get over the
fun
/func
craze of using it instead of just sayingfunction
. Swift, Go, Rust, they all do it.I agree with you on the
fun
part. I've been getting more into JavaScript recently and I can see the use of the full word (function
) being better for beginners overall."fun is short for function"
"Oh ok"
Yeah, but I still haven't seen the first person who doesn't question what
fun
is the first time they see it.Sometimes being clear and short don't go hand to hand.
there's a readability factor that I feel is added when you use the whole
function
. Especially for compiled languages, the "less characters" argument has no weight at all.It’s actually a “fewer characters” argument.
Actually in javascript es6 you don't have to type any word to create a function just () => {} which is the best notation IMHO
What's the benefit of typing out function?
There is none, it just adds more characters
Then we should use
f
because "un" would just add a few more characters 🤔.I think there's a fine line between short and too short.
There's a reason why we don't all prefer our Shakespeare or our technical documentation in SMS/text speak :).
Writing code Shakespeare style would be awful.
f
already stands forfunction
in mathematics:it's just what you start with, the next one would be
g(x)
Rust goes like: Fn... And I don't think there's anything wrong with writing instead of function, with good syntax highlighting there's barely a difference. I don't think code becomes any more readable by writing longer words. And Java's verbosity doesn't increase the readability at all. "final public static void" Btw you don't even have a function keyword in Java and nobody tends to make a problem of it.
the modifiers are necessary to differentiate non-final private/protected non-static methods with a return type ... it makes total sense 😅
Java Syntax has the weird ability to direct the attention to the less important parts of the code first.