Loading ...
Sorry, an error occurred while loading the content.

8753Re: "ocaml_beginners"::[] Should I 'open List'?

Expand Messages
  • Brian Hurt
    Oct 3, 2007
    • 0 Attachment
      On Thu, 4 Oct 2007, Jon Harrop wrote:

      > Indeed, I wonder why Printf isn't in pervasives as it is in F#...

      Because printf was a bad idea in C. Basically, you have a language within
      a language- and worse yet, it's a language within a string within a
      language. So your language- be it C, Ocaml, or F#, now needs to be able
      to parse both the nominal language and this special "printf" language. In
      addition, you can (in C, at least) dynamically construct format strings
      from peicing together other strings, and thus totally obscure from the
      compiler any ability to analyze this DSL at all.

      I note that even C++ ditched printf, in favor of iostreams. Which, modulo
      some bad implementation choices, I think is a better i/o library than
      printf. Yes, try not to faint- Brian Hurt, who hates C++ with a bitter
      passion and loves Ocaml, thinks that maybe C++ did something better than

    • Show all 18 messages in this topic