←back to thread

422 points km | 1 comments | | HN request time: 0.205s | source
Show context
perching_aix ◴[] No.41831129[source]
Well, at least the title is honest. Straight up asking people to break standards out of sheer conviction is a new one for me personally, but it's definitely one of the attitudes of all time, so maybe it's just me being green.

Can we ask for the typical *nix text editors to disobey the POSIX standard of a text file next, so that I don't need to use hex editing to get trailing newlines off the end of files?

replies(4): >>41831233 #>>41831275 #>>41831592 #>>41833146 #
bityard ◴[] No.41833146[source]
Why would you want that?

All Unix text processing tools assume that every line in a text file ends in a newline. Otherwise, it's not a text file.

There's no such thing as a "trailing newline," there is only a line-terminating newline.

I've yet to hear a convincing argument why the last line should be an exception to that extremely long-standing and well understood convention.

replies(1): >>41833701 #
perching_aix ◴[] No.41833701[source]
> There's no such thing as a "trailing newline," there is only a line-terminating newline.

Is "line-terminating newline" a controlled / established term I'm unfamiliar with or am I right to hold deep contempt against you?

Because "trailing newline", contrary to what you claim, is 100% established terminology (in programming anyways), so I'd most definitely consider it "existing", and I find it actively puzzling that someone wouldn't.

replies(2): >>41834339 #>>41835372 #
oasisaimlessly ◴[] No.41834339[source]
"Trailing newline" isn't anymore of a special phrase than "leading whitespace" (or "leftmost banana").
replies(1): >>41834730 #
1. perching_aix ◴[] No.41834730[source]
That is also true, adding to the bafflement factor of it supposedly being "non-existent".