One of the nice features of IPython is that I can inspect a function.
In : def inc(x): ...: """Increments a number""" ...: return x+1 ...: In : inc? Type: function String form: <function inc at 0x105f19758> File: /Users/christophercaycock/<ipython-input-1-f192044ce250> Definition: inc(x) Docstring: Increments a number
I can do this because there is can only ever be one definition of
inc, though it may operate differently depending on the type I provide it.
Many statically typed languages have overloading, where I can perform different actions depending on the type at compile time. In these languages, there may be multiple definitions of
I was wondering if there are interactive shells that can handle this. I checked IHaskell, but I couldn't actually find an example in their documentation.
I'm just curious as to whether it's even possible (and what it would look like) to provide interactive help in the face of overloading.