I was thinking about the old holy war that is curly brace placement, and decided that it really wasn't so much an issue with programmers as an issue with the IDE.
Most C-style programming languages* support a mishmash of whatever spacing and alignment the programmer would like:
foo(bar, baz) {
fizz();
buzz();
}
is functionally identical to:
foo(bar, baz)
{
fizz();
buzz();
}
is functionally identical to:
foo(bar,baz){fizz();buzz();}
No one questions this, but programmers are still apt to disagree over the correct formatting.
Because it's such a user preference, I thought it would be convenient if there was an IDE that would automatically re-flow the written code into the format specified by user preferences while leaving it as written:
foo
(
bar
,
baz
)
{
fizz();
buzz();
}
would be auto-formatted to look like:
foo(bar, baz)
{
fizz();
buzz();
}
or whatever your preference is, without changing the original code (or maybe auto converts it to a different format on save)…
And then I realized it's not likely that I've got an original idea.
So the crux of the matter is whether this functionality already exists, and I simply haven't found it, or whether it doesn't exist and I need to make it.
* I typically write in JavaScript, CSS, C#, and PHP; obviously this would be useless for a language such as Python.