
To be fair, isn't the printf typing in ocaml a massively ugly hack to the type system? Isn't there an example in the template haskell tutorial that gives a typesafe, clean generic printf function? Max On Jun 5, 2009, at 4:29 PM, Erik de Castro Lopo wrote:
oleg@okmij.org wrote:
Still, the code is a bit unsatisfactory because of the appearances of "error" in pr_aux functions. The errors like passing too many or too few arguments to printf (as demanded by the format specification) are caught only at run-time. We can certainly do better.
I'd love to see it.
Coming from Ocaml one of the things I miss is compile time checking of printf arguments.
Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe