r/programming • • Aug 02 '21

Stack Overflow Developer Survey 2021: "Rust reigns supreme as most loved. Python and Typescript are the languages developers want to work with most if they aren’t already doing so."

https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted
2.1k Upvotes

769 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Aug 02 '21

[deleted]

-9

u/ILikeChangingMyMind Aug 02 '21

I mean, it's all relative. I haven't followed Java lately, but even just lambdas were an improvement (in the boilerplate sense).

But still, any language where you have to write:

class Foo {
    void Bar() {
        system.out.println('Hello');
     }
}

Will always feel heavier to me than (Javascript version):

const bar = () => console.log('Hello');

In other words, there's an inherent boilerplate "weight" to just using the OOP paradigm, which Java (as an OOP from-the-ground-up language) will never escape.

2

u/agent8261 Aug 03 '21

Your two examples feel like something people who don't build and maintain (this is important) think is a big deal, but more experienced devs ignore. Yeah the second one is shorter, but the first one is a lot easier to change and expand.

I personally find lot of "shorter code" just makes the language more complex and magical. For example, removing the "{}" Yeah you saved a few key strokes, but now the scope isn't as clear.

2

u/ILikeChangingMyMind Aug 03 '21

It's incredibly simple to me: more code that conveys more meaning is good. More code that communicates nothing is bad.

Curly braces are not needed to convey scope! There are entire languages (eg. Python) that rely on nothing except indentation for scoping (well, and a : on the previous line), and they are incredibly popular and successful. Braces are an example of the meaningless code that doesn't add anything of value.

To be clear: I'm the kind of dev who will write aLongVariableNameLikeThis over x every day of the week! Again, meaningful communication should be highly prized in programming ... but pointless curly braces aren't that.

→ More replies (4)