4 ms·
I was thinking a while ago about formatting restrictions that could make sense in a language (programming, markup, whatever) to simplify things (… and which wou
by chrismorgan 4y ago
I was thinking a while ago about formatting restrictions that could make sense in a language (programming, markup, whatever) to simplify things (… and which would surely also annoy some users, but what’s life without fun?). Things like requiring tabs (partly because in a vacuum they’re simply better than spaces, and partly to protest against YAML which goes the other way), and banning carriage returns (how much trouble has supporting both ␍␊ and ␊ caused, I wonder? It’s not a little). Requiring EOL at EOF was also one I thought of.
- spicybright 4y agoOne project you may be interested in is Black for python. It's a code formatter that provides one style with very limited configuration. The idea being the rigidness removes bike shedding and forces consistency. Of course you can use any code formatter and configure it to your liking, but there's something to be said about not giving the user levers to pull and argue about. Everyone just download Black, and you're good to go. https://black.readthedocs.io/en/stable/ https://black.readthedocs.io/en/stable/
- breck 4y agoTabs versus spaces is an interesting one. I was 100% convinced spaces were the way to go. But then ~1.5 yrs ago made a lang with tabs and it was a lot easier to work with in a spreadsheet IDE interface. I'm in the midst of a big refactor of one of my upstream libraries so that I could at least make it an easy thing to switch to tabs if they are indeed better.