The benefit I see is that (at least in Erlang) pattern matching combines pre-condition asserts with programming the sunny path.  For example,<p><pre><code>   &quot;&#x2F;&quot; ++ X = HttpRequest:get(path).
</code></pre>
will crash if PATH_INFO doesn&#x27;t include leading slash.  Writing just the sunny path and getting asserts &quot;for free&quot; (without any clutter) is a fun way to program.<p>I also find that statement very readable.<p>BTW, here&#x27;s some Java code that does the same thing:<p><pre><code>  String Path;
  if (HttpRequest.getPathInfo().startsWith(&quot;&#x2F;&quot;)) {
     Path = HttpRequest.getPathInfo().substring[1:];
  } else {
     String emsg = &quot;no match of right hand side value \&quot;%s \&quot;&quot;;
     throw new IllegalStateException(emsg.format(HttpRequest.getPathInfo());
  }</code></pre>