Such library functions tend to also accept a string as a valid input. E.g. db.execute from the GP usually works with strings to allow non-parametrized SQL queries.
It's difficult to call Madhava's work calculus as we know it. He and his school certainly made huge contributions to analysis of infinite series, but they did not develop that into a unifying framework. It's important to note that no mathematics is done in a vacuum, if Newton/Leibniz "invented" Calculus, it's by building on top of hundreds of years of work done throughout the world.
This is a classic problem you can make in any language. If you were doing Java, and forgot to use `finally` for a resource, you'd have a leak due to an exception.
I do not know what metric you use to define "better"