News for hackers. Stuff that matters.
Re:Why Go Gets Exceptions Right by barrkel on Friday September 14, 2012 @09:42AM (#4521556)
No library in a language with exceptions as they're normally used would do that. Exceptions are for exceptional cases. You use the method that throws only if it is a programming error for it to throw; and you do not, as a general rule, catch exceptions. See eg Dictionary.TryGetValue in .net. Your argument is against a straw man, IMHO.
Re:Why Go Gets Exceptions Right by TylerE on Friday September 14, 2012 @09:44AM (#4521565)
So are you saying python is not a sane language?

    >>> a = {}
    >>> a['foo']
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    KeyError: 'foo'
Re:Why Go Gets Exceptions Right by kevingadd on Friday September 14, 2012 @10:22AM (#4521730)
Python uses Exceptions for unexceptional cases, yes, like loop termination. It's one of the only languages to do it.
Re:Why Go Gets Exceptions Right by Evbn on Friday September 14, 2012 @09:30PM (#4524877)
It is widely agreed that this behavior is a hack in Python. It is not a role model.