3 ms·
I don't see any value whatsoever in removing carriage returns just so you can say it's one line of code. It might make it sound clever, but it really isn't. It'
by ksaj 4y ago
I don't see any value whatsoever in removing carriage returns just so you can say it's one line of code. It might make it sound clever, but it really isn't. It's not good to read, and that to me is much more of a minus than a plus.
- nine_k 4y agoEach CR is one byte; removing them makes the code noticeably smaller. Each piece of code is well under a kilobyte,
- ksaj 4y agoAh... so it's the challenge, and not whether anyone will ever use it. In the same vein, there's an old DOS assembler trick from the late 80's through the mid 90's - remap INT 20h (which was a 1-byte opcode to exit the currently running program), to INT 21h (a 2-byte instruction for DOS, which includes a clean exit for the program as a built-in function). This could break how programs exit cleanly, but probably never did. In a substantial program, it saved a lot of bytes in DOS calls. It was mostly used competitively, but it was a pretty stable code size hack.