• @SpaceNoodle
    link
    191 year ago

    If you’re using C++, why not use streams?

    • @solrize
      link
      151 year ago

      Yes, fprintff is a C thing.

      • @SpaceNoodle
        link
        5
        edit-2
        1 year ago

        Well, that means that it’s also a C++ thing, but streams are an even slicker concept that aren’t a C thing, making higher-level code look nice and shiny - and abstracting away loads of I/O pain points while encapsulating useful features.

        • @solrize
          link
          71 year ago

          C++ streams are ugly in their own right, but C++ preferred practice these days is to treat it as its own language rather than as a C superset. That is, lots of crufty old C stuff still works in C++ for legacy reasons, but using it when you don’t have to is considered inappropriate.

          • @SpaceNoodle
            link
            11 year ago

            Yeah, streams are old and crusty and horrific on the inside (don’t ask about the time I implemented a socket layer with streams), but still less clunky than the C standard library (unless you’re really into being a memory Nazi).

    • AlexOP
      link
      fedilink
      11 year ago

      I wasn’t personally using C++, I was using relatively modern C which has had an homegrown object system added to it.

      • @SpaceNoodle
        link
        1
        edit-2
        1 year ago

        Then it’s not C++. And probably an even bigger mess.