Re:Vim creator Bram Moolenaar's forgotten programming langua...
by zarzavat on Thursday August 24, 2023 @08:37PM
(#37256388)
Unmatched braces completely mess up text editors, which would need to include a full parser in order to pair-match brackets (it also creates an unresolved tension that will stay with you all day :)
[ Parent
| on HN ]
Re:Vim creator Bram Moolenaar's forgotten programming langua...
by goku12 on Thursday August 24, 2023 @10:07PM
(#37257033)
I was going to say the same. And yes - it causes OCD in 90% of devs out there. But it also feels somewhat wrong for editors to match brackets to infer block hierarchy. What if blocks have some sane rule that we don't know yet (i.e other than bracketed blocks and indented blocks)? Perhaps treesitter is the one-stop solution for that problem.
Re:Vim creator Bram Moolenaar's forgotten programming langua...
by cozzyd on Thursday August 24, 2023 @11:15PM
(#37257581)
Indeed. Things like di{ probably don't work...
Re:Vim creator Bram Moolenaar's forgotten programming langua...
by kgwxd on Friday August 25, 2023 @01:12AM
(#37258315)
> :)
That’s a mouth, not a paren :/ I won’t be able to sleep tonight :)) (that’s better
Re:Vim creator Bram Moolenaar's forgotten programming langua...
by The_Colonel on Friday August 25, 2023 @04:55AM
(#37259562)
Many languages are designed with IDEs in mind and "dumb" text editors are not a concern.
Re:Vim creator Bram Moolenaar's forgotten programming langua...
by vidarh on Friday August 25, 2023 @08:28AM
(#37260932)
Text editors need fairly complete parsers to match braces anyway. E.g. consider even something as simple as { "}" }. Or {"\"}. The former is reasonably unambiguous, but the latter requires knowing if the escape style of double quoted strings in the given language escapes the second '"' or not. Now try proc {"#{"}"}"} (valid Ruby) vs proc {"{\#{"}"}"} (invalid)