this post was submitted on 05 Apr 2025
161 points (96.5% liked)

Programmer Humor

35244 readers
122 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] -2 points 2 weeks ago (10 children)

If you write to a text (as opposed to binary) stream, \n produces \n or \r\n (or \r if old enough) depending on platform just fine.

Nobody should be using C++ anyway, but plenty of languages have silly system newline constants, which do nothing useful.

[–] MrScottyTay 4 points 2 weeks ago (9 children)

Why should no one be using c++?

[–] [email protected] 3 points 2 weeks ago (8 children)

It's memory unsafe and it's syntax is indistinguishable from the runes which summon cthulu.

[–] MrScottyTay 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I think the memory stuff is pretty good nowadays. I'm sure I saw modern C++ can have a garbage collector. And the syntax is only runelike until you learn it, like any language really. As an industry C# developer I've recently taken up C++ as a hobby to better learn the workings of low level code and I've been enjoying it so far.

[–] [email protected] 1 points 2 weeks ago* (last edited 2 weeks ago)

c# has lovely syntax and languages like it and python are pretty readable with basic coding knowledge. C++ if you don't know a symbol there's too many options and the risk of misunderstanding is too high.

I will agree with your claim "if you learn the syntax then you know the syntax" but I don't find this valuable.

load more comments (6 replies)
load more comments (6 replies)
load more comments (6 replies)