Source
- URL: https://x.com/nicbarkeragain/status/2084851804224004329
- Author: Nic Barker (@nicbarkeragain)
- Posted: 2026-08-05 03:59:39
Thread
1/ @nicbarkeragain
An example of this - a classic way to construct a tree in code is with push / pop style calls. Forgetting to call pop() or close() can be annoying to debug, and you can make this much easier just enforcing matching string tags on open / close. Also enforces readability:
Branches: 2026-08-05-lionkimbro10x-i-love-everything-about-this-and-i-agree-its-fine, 2026-08-05-hasen_95dx-this-particular-case-though-is-easily-solved-with, 2026-08-05-choco_dolphin7-1-got-into-the-habit-of-immediately-writing-free, 2026-08-05-borrowck_novel-thanks-a-lot-for-the-example, 2026-08-05-plasm_nl-thats-a-great-tip-i-always-used-comments-but-this, 2026-08-05-datgame-ah-matching-strings-just-like-xml, 2026-08-05-rep_movsd-or-you-could-use-c-with-raii-and-not-have-to-tie, 2026-08-05-eta9499-deferloop-is-super-useful-for-this, 2026-08-05-windless_mill-tangently-this-example-illustates-pretty-good-why, 2026-08-06-real_philogy-rusts-ownership-raii-makes-such-patterns-really
2/ @exacoustics
@nicbarkeragain
Stealing this idea