Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: unusual code in proc.go could use documentation #20717
What version of Go are you using (
Comment I added to CL:
_I've changed my mind. This doesn't need careful documentation. It's a common pattern for code in runtimes - and other systems - to cause deliberate crashes when things are clearly not working.
To someone reading the code, it should be very clear that this code will cause a trap, and if the reader is not accustomed to reading runtimes, a glance to the line immediately preceding should make it very clear why we're trapping._
If you follow this to its conclusion, you'll end up needing to comment everything about how everything works for people unfamiliar with such systems. That's not a good precedent.