News for hackers. Stuff that matters.
Re:Still in love with Rust by int_19h on Thursday November 22, 2018 @04:26AM (#18508904)
Long lines come most often in conditions of if- and while-blocks, mostly because there's no way to split them over multiple lines that isn't visually hideous.

But a condition can be easily split if it is assigned to a variable, and that variable then tested. And naming said variable well can make a comment explaining the condition redundant.

Re:Still in love with Rust by goldfeld on Thursday November 22, 2018 @04:37AM (#18508945)
Yes, that's a great example, especially with deep nesting which forced indentation makes worse. But the solution feels like working against the grain, when a language should be working for human readability, not for workarounds to make a scripting language featureful.
Re:Still in love with Rust by int_19h on Thursday November 22, 2018 @07:28PM (#18513521)
One would argue that forcing long conditions to be split up, and intermediate steps named, is rather encouraging readability. ~
Re:Still in love with Rust by jononor on Thursday November 22, 2018 @04:44AM (#18508987)
Yes, prefer a named variable if the logic gets long. If it is really long, consider introducing a function to calculate the predicate.