this post was submitted on 09 Jun 2024
229 points (80.5% liked)

> Greentext

2742 readers
83 users here now

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

Do you know why sharp is added to the end of programming languages? Like c sharp and f sharp?

Actually, I don't even know if it is pronounced c sharp or f sharp. I just assumed it was the same as music.

[–] [email protected] 33 points 3 weeks ago (1 children)

Do you know why sharp is added to the end of programming languages? Like c sharp and f sharp?

There was (and still is) a language called C. Then C++ was invented. And then C#, maybe because # looks kinda like 4 pluses.

There is also another programming paradigm, called functional programming. F# is a functional programming language and runs on the same platform as C# (that platform is called .NET). That's why they named it F#.

Actually, I don't even know if it is pronounced c sharp or f sharp. I just assumed it was the same as music.

Yes, it's pronounced see sharp.

[–] [email protected] 6 points 3 weeks ago (1 children)

Very cool, thank you for explaining that.

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

a sharp symbol is ++ stacked on top of ++ So C ++ ++ becomes C#

Phonetically, It is C sharp because it sounds cooler than C hash or C pound.

[–] Hawke 15 points 3 weeks ago

Also because in music, C# is a half-note higher than C.

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

Rad. Thanks! What do the pluses denote in a programming language? What's the difference between c+, c++ and c sharp?

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

++ is the increment operator in C, which increases a value by 1. C++ was intended to be an improvement on C, and so it's saying that C++ is C incremented. C# is C++ ++ or C++ incremented. It's just a bunch of programmer jokes. There isn't a C+ afaik.

[–] [email protected] 4 points 3 weeks ago

Oh, haha, got it. Thanks

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

"We did make C better, but what you're getting back from us isn't the better thing."

🙂

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

There is no c+. The reason is that ++ means "increment by 1" in c itself (and many other languages).

[–] [email protected] 3 points 3 weeks ago
[–] hawgietonight 1 points 3 weeks ago (1 children)

It's funny that in spanish only the "c" is translated.

We say "ce sharp"

[–] [email protected] 1 points 3 weeks ago

Same in French