Closed kjx closed 8 years ago
One way to think about this is what is the type of print:
method print ( _ : type { } ) // print can print anything
method print ( _ : type { asString -> String } ) // print can print anything that can be converted to a String
method print ( _ : String ) // print can only print Strings
we need to spec print.
we could make it cleverer, so that it can print any object whatsoever, not just any object that has an "asString" method that works properly. You know, like this one: