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.
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 😅