Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
The proper response to this is that this is the correct behavior, since moving the line down (newline) and moving the output point to the beginning of the line (linefeed) are indeed conceptually separate and have different uses. The Unix conflation of the two is arguably harmful, since it perpetuates the confusion between the two by making newline do both. While I agree that newline-only is much easier to think about and type manually, I also acknowledge that occasionally Microsoft made the technically correct design decision and this is one of them.
(Yes, I am aware this is probably a troll, but other people might not be, so it's still worth explaining.)
aritzh8002y@powerfulparadox I think it did make sense in the typewriter era, however, nowadays it makes no sense to separate both.
On a computer, you rarely do \n without a \r, and if you need to do it, you can use ASCII escape sequences to position the cursor right where you want.
On top of that, on linux you can use \r in the same way you can on windows, it is only \n that changes.
devios159892y@powerfulparadox I disagree. I cannot think of any informational use of splitting these supposedly separate concepts up in a way that is universal to all consumers of that data.
If it happens to make sense in the interface you are using that a newline should *not* return the cursor to the beginning of the line, the implementation of that interface should handle the re-indenting. But in my mind this notion has no place in a file, because it’s no longer representing raw data but is now dependent upon implementation-specific behaviour.
@devios1 It's a remnant of the days of teletype and terminal outputs. Yes, the modern world doesn't need that anymore, but when DOS (and UNIX) was designed it was arguably useful to store things that way and not be dependent on a device driver to guarantee the correct behavior.
I wasn't intending to argue that it should still be that way, but the DOS source code is different. It's a historical artifact and should be treated as such.
kshep9233922yI'm watching the follow-up reply tho 👀