Functional programming

Chris Angelico rosuav at gmail.com
Tue Mar 4 16:06:17 EST 2014


On Wed, Mar 5, 2014 at 7:50 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> The "rigmarole" is trying to get around Java's mandatory exception
> handling limitations, which Python doesn't have.
>
> You are not allowed to pass a lambda to the super constructor that
> throws an SQLException. To get around the limitation, a RuntimeException
> wrapper is created to smuggle the SQLException through the compiler's
> defenses. Any code is free to throw a RuntimeException.
>

Oh, it's THAT problem. Well, it's still not really a fair comparison
of declared types. It shows how Python's much easier to work with, but
what you're showing off is the simpler exception handling :)

ChrisA



More information about the Python-list mailing list