News for hackers. Stuff that matters.
Re:The Rise of Whatever by matsemann on Friday July 04, 2025 @04:21AM (#44462389)
> and it’s wrong often enough

How is it ever wrong, though? If I insert a (, and then a {, and the editor appends so that it's ({}), that's always ?correct. Can it ever not be.

Maybe because on a Norwegian keyboard { is a bit awkward, but I like it. Then even if we're 5 levels deep with useEffect(() => {(({[{[ I can just press ctrl+shift+enter and it just magically finishes up everything and put my caret at the correct place, instead of me trying to write ]}]})) in the correct order.

Re:The Rise of Whatever by Kon5ole on Friday July 04, 2025 @05:11AM (#44462725)
>How is it ever wrong, though?

Whenever you edit something existing that already has the ), ] or } further down and you end up with a ()), []] or {}}. Or when you select some text that you want to replace and start with a quote only to end up with "the text you wanted to replace" instead of the expected ".

I never notice when it works but get annoyed every time it doesn't, so I feel like it never works and always sucks.

I guess it's muscle memory and some people are used to it, but it feels fundamentally wrong to me to have the editor do different basic editing things based on which character is being pressed.

Re:The Rise of Whatever by jltsiren on Friday July 04, 2025 @05:04AM (#44462659)
Most editors are not smart enough to do it consistently right. For example, VS Code often inserts extra quotes when I try to break "long string" into "long " + something() + " string". And when I try to write a half-open interval [a, b) in a comment or within a string, the editor inserts an extra ].
Re:The Rise of Whatever by rcxdude on Friday July 04, 2025 @04:43AM (#44462525)
It certainly can, because it doesn't necessarily know where the closing brace should be, especially when inserting as opposed to writing a completely new line. I'm often deleting random crap in the editors I use with the 'feature' as I'm adding delimiters. '"' tends to be even worse, because the distinction between opening and closing is not obvious.

e.g.:

(a + b > c) -> ((a + b > c) -> (()a + b > c) -> no, I was aiming for ((a + b) > c)

(it sound like you're talking about a different feature/implementation, though, since in the annoying case there's no 'completion' shortcut, it just appears)

Re:The Rise of Whatever by Attrecomet on Friday July 04, 2025 @11:08AM (#44465211)
> can just press ctrl+shift+enter and it just magically finishes up everything and put my caret at the correct place, instead of me trying to write ]}]})) in the correct order.

I think here you are talking about a different thing -- completion of already started parentheses/"/whatever with content in-between, not the pre-application of paired braces or quotation marks, as the author did, no?

Re:The Rise of Whatever by charles_f on Sunday July 06, 2025 @01:10AM (#44478008)
I can't count how many } I've deleted across the years because of that feature