News for hackers. Stuff that matters.
Re:Google broke a conditional statement that verifies passwo... by tialaramex on Thursday July 22, 2021 @09:28PM (#27926295)
Certainly I find

  if (key_data_.has_value() && !key_data_->label().empty())
    return key_data_->label();
to be less readable than:

  if let Some(label) = key_data_ {
    label
  }
It's notable that people complain Rust adds too many odd punctuation marks, and yet in this example it's C++ with an exclamation mark, question marks, and two different structure member operators (dot and arrow) while Rust just does the pattern match.

There are no comments on this comment yet.