News for hackers. Stuff that matters.
Re:The general value of typed functional programming lies in... by xamuel on Monday February 24, 2020 @12:13PM (#22405962)
This is especially evident in e.g. third-party Python libraries.

For example, say you have a pandas dataframe with a column "foo" and you accidentally try to read column "fooo". Instead of getting a useful exception like "PandasException: Attempted to read nonexistent column 'fooo'", you get a traceback 10 layers deep, terminating in something like "pandas.hashtable.PyObjectHashTable.get_item" which ought to be totally invisible to you, the library user.

Re:The general value of typed functional programming lies in... by fjp on Monday February 24, 2020 @01:29PM (#22406818)
This is how it should be done, I'm such a fan of this page: https://www.psycopg.org/docs/errors.html

Edit: by "this" I meant to agree with parent: Getting a useful, well defined exception is how it should be done. Psycopg2 does this very well.