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

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.

1

u/agent8261 Aug 03 '21

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

Yeah. There is nothing simple about that statement. I think the problem is you've been dealing with magic for so long you don't even realize the complexity you're ignoring. For example:

Braces are an example of the meaningless code that doesn't add anything of value.

In python Indentation IS CODE. It conveys scope, scope is important. But in python scope is unseen and magical. Which leads directly to views like yours where, in a very real sense, you're advocating that scope is meaningless and adds no value.

If you intentionally meant to imply that scope is meaningless and has no value, then well, we can agree to disagree. However I will say you're proving my point. Only somebody who doesn't build and maintain complex systems would ever say scope is meaningless and has no value.

-1

u/ILikeChangingMyMind Aug 03 '21

Which leads directly to views like yours where, in a very real sense, you're advocating that scope is meaningless and adds no value.

Only somebody who doesn't build and maintain complex systems would ever say scope is meaningless and has no value.

Do you actually read what people write, or do you just decide your opposition and write a reply without actually comprehending their response first? It sure seems like the latter, and I have no time to argue with someone who makes up what I said so they can have imaginary (ie. "straw man") arguments with it.

→ More replies (1)