News for hackers. Stuff that matters.
Re:The Bipolar Lisp Programmer by jsight on Friday August 11, 2023 @09:16AM (#37088344)
> The "unused variable is an error" is the most egregious of them that I hate with a passion.

Same. That has tripped me so many times when trying out something simple in golang.

I get why they are undesirable in the long run, but in the short run I'm often trying out a fragment and don't have the users of every variable written yet.

Re:The Bipolar Lisp Programmer by bloopernova on Friday August 11, 2023 @09:25AM (#37088449)
Your comment and the grandparent comment have both really validated me. I know that's weird to say, but I really thought I was just Wrong about the linters/LSPs and unfinished lines or unused variables. Thank you :)
Re:The Bipolar Lisp Programmer by sph on Friday August 11, 2023 @10:17AM (#37088940)
Those that implemented the unused variable feature are completely unaware that there are two modalities of programming: exploring a problem space, and building a solid product.

When you're exploring, you don't want your compiler to stop you in your tracks to warn you about pedantic nonsense. It's not a syntax error that prevents your compiler from understanding, it's just arbitrary restriction that the compiler decides to pester your about, a sort of a robotic grammar nazi.

Computers are obtuse, the worst thing they can do is ignore your perfectly parseable and valid instructions for arbitrary reasons. Machine, if you know I'm not using a variable, kindly let me know and carry on doing your job.

Re:The Bipolar Lisp Programmer by potta_coffee on Friday August 11, 2023 @11:16AM (#37089640)
I'm certain they're aware of the second modality; I just think that Go is narrowly focused in design and it's not really for that other kind of user.
Re:The Bipolar Lisp Programmer by kragen on Friday August 11, 2023 @01:36PM (#37091440)
it is vanishingly unlikely that ken thompson and rob pike are unaware that people sometimes program to explore a problem space
Re:The Bipolar Lisp Programmer by sph on Friday August 11, 2023 @03:14PM (#37092663)
Ken's first language is pretty tolerant of programmer silliness, maybe too much.
Re:The Bipolar Lisp Programmer by kragen on Friday August 11, 2023 @07:19PM (#37095211)
do you mean ibm 709 assembly or what

i don't actually know what he was hacking on at berkeley

Re:The Bipolar Lisp Programmer by shrimp_emoji on Friday August 11, 2023 @02:04PM (#37091798)
You are wrong, just like these other people.

You guys want to have your cake and eat it too -- to be correct despite being lazy and sloppy.

It makes no sense. Bite the bullet. Don't have unused variables. There's no such thing as "exploration". After you've "explored" enough (where "explored" means "coded sloppily"), you've quickly exhausted your mental buffer, and it's suddenly expensive to go back and polish what you've done, making yesterday's exploration today's (hopefully not too creaky) foundation.

Re:The Bipolar Lisp Programmer by JonChesterfield on Friday August 11, 2023 @06:33PM (#37094860)
It is trivial to ignore unused variables, early returns leaving dead code and so forth while editing and then check&reject them before applying to production. Fix whitespace in the same git hook.

This is one where faster local development (because you don't have to repeatedly, jarringly stop what you're doing and patch up something that doesn't matter) and clean source in a common repo are both possible and very easy to achieve.

But whatever. Yay go.

Re:The Bipolar Lisp Programmer by sph on Friday August 11, 2023 @10:13AM (#37088900)
My hype for Zig died the day Andrew decided to push for that nonsense.
Re:The Bipolar Lisp Programmer by pjmlp on Friday August 11, 2023 @03:16PM (#37092703)
For it was the use of @, Objective-C style, and not having an answer for use-after-free.

If I need to use analysers to fix that, I already have those for C and C++ for the last 30 years.