Twitter | Pretraživanje | |
Saoirse Shipwreckt
My real hot take: you do need some formatting consensus, but nothing more than Rust has had since before 1.0: - what a normal indentation is - what casing is used for each kind of name Nothing else! Beyond that every decision should be made contextually by the code author
Reply Retweet Označi sa "sviđa mi se" More
Saoirse Shipwreckt 31. sij
Odgovor korisniku/ci @withoutboats
Automatic formatting rules consistently make actual code worse! Casing rules and common indentation are literally all you need
Reply Retweet Označi sa "sviđa mi se"
10x Milkshake™ 1. velj
Odgovor korisniku/ci @withoutboats
For each consecutive argument in a function I indent 2.5 spaces. Ending braces are indented an amount of spaces equal to the line distance from the start brace - brilliant for visualising the amount of lines in a block.
Reply Retweet Označi sa "sviđa mi se"
Cecile Tonglet 🦀 1. velj
Odgovor korisniku/ci @flukejones @withoutboats
Use a non-breaking space (0xa0) after the words impl, struct, enum and mut
Reply Retweet Označi sa "sviđa mi se"
Jeremy Fitzhardinge 1. velj
Odgovor korisniku/ci @withoutboats
Yeah rigorous formatting rules ignore the fact that formatting can (and should) have semantic value.
Reply Retweet Označi sa "sviđa mi se"
InsanityBit 31. sij
Odgovor korisniku/ci @withoutboats
Enforced code formatting is GARBAGE. I have keratoconus and what works for other people absolutely, 100% does not work for me. I zoom in 200% on every screen, I add spacing between lines, etc. If you enforce stupid layout shit I'm not touching the language.
Reply Retweet Označi sa "sviđa mi se"
to kubectl or not to kubectl that is the question 31. sij
Odgovor korisniku/ci @InsanityBit @withoutboats
people should be able to customize how it looks to you and stored in whatever format. Some people need really wide tabs and large text as an accessibility thing, but all the software doesn't really do that, so then it chooses spaces.
Reply Retweet Označi sa "sviđa mi se"
ven 31. sij
Odgovor korisniku/ci @withoutboats
i think this is the sanest take on that topic.. always love auto formatters moving my 4x4 matrix declarations around..
Reply Retweet Označi sa "sviđa mi se"
Florian Gilcher ∠(・.-)―〉 →◎ 16 h
Odgovor korisniku/ci @withoutboats
Reply Retweet Označi sa "sviđa mi se"