3 ms·
I think it's less about typing them and more about reading them. Curly braces reduce the number of keywords in the language (unless the alternative is indentati
by nequo 4y ago
I think it's less about typing them and more about reading them. Curly braces reduce the number of keywords in the language (unless the alternative is indentation sensitivity like in Python or Haskell). This means that if I see a word, it is easier to infer if it is a variable name or if it does something structural.
How about a treesitter-based editor extension that converts between begin/end and {/}, as if they were ligatures? Actually this might not even need treesitter.
- armchairhacker 4y ago> How about a treesitter-based editor extension that converts between begin/end and {/}, as if they were ligatures? Actually this might not even need treesitter. See emacs prettify-symbols-mode (https://emacs.stackexchange.com/questions/46529/configuring-prettify-symbols-mode https://emacs.stackexchange.com/questions/46529/configuring-...)
- xigoi 4y ago> How about a treesitter-based editor extension that converts between begin/end and {/}, as if they were ligatures? Actually this might not even need treesitter. Neovim has the conceal feature, which can convert Treesitter nodes into a single symbol, but not the other way around unfortunately.
- cxr 4y agoI'd rather have systematic "language skinning", where different flavors (begin and end versus { and }) are isomorphisms of each other so one's tooling can fluidly translate between both forms. Rochus is almost kind of doing this with Oberon+ versus Wirthian Oberon already, but it would be nice to go further.