The second message is arguably clearer, but I don't think anyone would be really hindered by the first one, especially given that, unlike in C, application of printf have an explicit type:
# Printf.sprintf "some int: %d another int: %d";;
- : int -> int -> string = <fun>
I think a general tendency in statically typed languages is that we like to write stuff using only the type system, rather than adding code to the compiler. Same for macros: we will rather have them proved correct by the typechecker than make them raise errors (also it is possible, through exceptions).
But maybe this is detrimental to clarity of errors in some cases. I'd be interested to see how Racket handles errors.
But maybe this is detrimental to clarity of errors in some cases. I'd be interested to see how Racket handles errors.