• @edinbruh@feddit.it
      link
      fedilink
      514 days ago

      Unix needed only \n because it had complex drivers that could replace \n with whatever sequence of special characters the printer needed. Also, while carriage return is useful, they saw little use for line feed

      On dos (which was intended for less powerful hardware than unix) you had to actually use the correct sequence which often but not always was \r\n (because teleprinters used that and because it’s the “most correct” one).

      Now that teleprinters don’t exist, and complex drivers are not an issue for windows, and everyone prefers to have a single \n, windows still uses \r\n, for backward compatibility.

    • Arghblarg
      link
      fedilink
      113 days ago

      Bedeviled NXP/ARM SDK stdlib. Hate it, we need \n\r there. Why!!! What a PITA.