Skip to content

re: Which mainstream programming language has the ugliest syntax? VIEW POST


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.


Java Syntax has the weird ability to direct the attention to the less important parts of the code first.


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.

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


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 😅


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 for function in mathematics:

y = f(x)

it's just what you start with, the next one would be g(x)

code of conduct - report abuse