Yarn's Future – v2 and beyond
> The log system will be overhauled - one thing in particular we'll take from Typescript are diagnostic error codes. Each error, warning, and sometimes notice will be given a unique code that will be documented - with explanations to help you understand how to unblock yourself.Why do programmers love error codes? As an end user, they are useless indirection to me and the only way this would even be tolerable is if the explanation was printed directly next to the error code, so why bother? Is it code quality, since you don't have to write a long error message when you emit a similar error? But doesn't that have the drawback of encouraging error code reuse when it might not be appropriate?[append]Thanks for the replies! I guess I could understand error codes for search ability that also provide information about the problem specifics.Counterexample:  $ yarn add foo
  Error YARN1001: Incompatible peerDependencies.
  $ yarn explain YARN1001
  # Some longer text about how two of my modules have
  # incompatible peerDependencies

Better example:  $ yarn add foo
  Error Yarn1001: Incompatible peerDependencies.
  * my-package@1.0.0
  |-* foo@1.0.0
  |-* bar@1.0.0
  |-* left-pad@1.0.1 (peerDependency of bar@1.0.0)
  |-* left-pad@0.9.0 (peerDependency of foo@1.0.0)
  $ yarn explain YARN1001
  # Some longer text about how two of my modules have
  # incompatible peerDependencies