Re:Formatting code should be unnecessary
by someothherguyy on Monday September 08, 2025 @03:27AM
(#45165498)
ftfy
[ Parent
| on HN ]
Re:Formatting code should be unnecessary
by Marazan on Monday September 08, 2025 @04:03AM
(#45165724)
That is harder to read than the long line version.
However, it is the formatting I adopt when forced to bow down to line length formatters.
Re:Formatting code should be unnecessary
by someothherguyy on Monday September 08, 2025 @05:54AM
(#45166378)
to you, to me, it reads nicely, and thus the issue -- editors should have built in formatters that don't actually edit source code, but offer a view
Re:Formatting code should be unnecessary
by thaumasiotes on Monday September 08, 2025 @06:04AM
(#45166436)
To me, that reads fine, but it has lost the property elevation wanted, which was that it's easy to compare the values assigned to any particular parameter across multiple calls. In your version you can only read one call at a time.
Re:Formatting code should be unnecessary
by lenkite on Monday September 08, 2025 @06:08AM
(#45166472)
Err..I find the short-line version easier to read. Esp if you need to horizontally scroll.
This is why a Big Dictator should just make a standard. Everyone who doesn't like the standard approach just gets used to it.
Re:Formatting code should be unnecessary
by DonHopkins on Monday September 08, 2025 @07:01AM
(#45166832)
This is good, and objectively better than letting the random unbounded length of the function name define and inflate and randomize the indentation. It also makes it easier to use long descriptive function names without fucking up the indentation.
setup_spi(&adc,
mode=SPI_01,
rate=15,
cs_control=CS_MUXED,
cs=0x01
);
setup_spoo(&adc,
mode=SPI_01,
rate=15,
cs_control=CS_MUXED,
cs=0x01
);
setup_s(&adc,
mode=SPI_01,
rate=15,
cs_control=CS_MUXED,
cs=0x01
);
validate_and_register_spi_spoo_s(&adc,
mode=SPI_01,
rate=15,
cs_control=CS_MUXED,
cs=0x01
);
Re:Formatting code should be unnecessary
by DemocracyFTW2 on Tuesday September 09, 2025 @01:05AM
(#45177617)
Here, fixed it for you:
setup_spi(
&adc,
mode = SPI_01,
rate = 15,
cs_control = CS_MUXED,
cs = 0x01 );
setup_spoo(
&adc,
mode = SPI_01,
rate = 15,
cs_control = CS_MUXED,
cs = 0x01 );
setup_s(
&adc,
mode = SPI_01,
rate = 15,
cs_control = CS_MUXED,
cs = 0x01 );
validate_and_register_spi_spoo_s(
&adc,
mode = SPI_01,
rate = 15,
cs_control = CS_MUXED,
cs = 0x01 );