title: How do different languages handle the "dangling else"?
body: <p>I often see the dangling else handled as:</p>
  
  <pre><code>if (x &gt; 0)
    if (y &gt; 0)
      print "hello"
  else
    print "world"
  </code></pre>
  
  <p>the parser or interpreter will actually match the else with the closest if statement, which is the "if (y > 0)".</p>
  
  <p>Does any language have the pitfall of actually matching the else with the outer if or the farthest if?  (except the obvious Python)</p>