flucoma / flucoma-sc

Fluid Corpus Manipulation plugins for Supercollider
BSD 3-Clause "New" or "Revised" License
70 stars 16 forks source link

Classes: uniform sc default indentation #134

Closed elgiano closed 2 years ago

elgiano commented 2 years ago

Sorry if you see this as pedantic, but I thought it would be nice to have uniform indentation in all SuperCollider files for this project! Many times I encountered files with mixed indentation, and I thought this could be a good time to make them uniform :)

SuperCollider code defaults to indentation using tabs. All sc files in the main codebase are formatted like this. Here I just opened every .sc file with scide, selected all code, and automatically indented it pressing Tab.

Since I'm not aware of any sc linter, I haven't considered any other style-guide rule (https://github.com/supercollider/supercollider/wiki/Code-style-guidelines#supercollider), only indentation and trailing white-spaces.

jamesb93 commented 2 years ago

Also, tabs are more inclusive!

The main reason I would like to see this change is for refreshable braille displays that are used by blind programmers a lot. Each space wastes one braille cell and takes away valuable braille realestate. So if the default indentation of a project is 4 spaces per level, a 3rd level indentation wastes 12 braaille cells before code starts. On a 40 cell display, which is the most commonly used with notebooks, this is more than a quarter of the available cells wasted with no information. If each indentation level was represented by only one tab character, there would be three cells occupied by a tab character each, and on the 4th cell, the code would start. That's less than 10 percent occupied on the same length display, but all cells contain valuable information that is easily discoverable and immediately comprehensible.

tremblap commented 2 years ago

Thanks @elgiano it passes all Unit Testing so I've merged in