It doesn't actually feel more readable to me. I find the idea that the lock declaration sits at the same level as the lock content confusing.
with lock {
// do stuff
}
design. This could be C++ too to be honest because lambdas exist but RAII is just too common for people to design their locks like this.This syntax looks more like Python or Rust.