Perhaps a controversial take: it’s difficult to write boring code in the common boring languages because they are not powerful enough to express the problem domain without accidental complexity.
Scala has sealed traits, which may only be implemented in the same file, and pattern matching must be exhaustive. At a glance, Java 17 has something similar (JEP 409 sealed classes).
It depends what you are trying to write. But I’ve seen people complain about the lack of generics in Golang, and I’ve also seen really great cryptography code in Golang (TLS implementations, etc.)