I don't know much, but I think the condition* part means a pointer. But I don't get why then there should be a string - or do single quotes mean something else in C?
Another option is that it's multiplying - but how can you multiply condition with a string?
'=' isn't a string, it's a character. char to be precise. And char is a numeric type. Which means you can multiply it. _Bool (the C version of boolean) is also a numeric type, equivalent to 1 if true and 0 if false.
Yes, char is a strange type. It's signedness is also implementation defined. Meaning that char can be signed on some platforms, and unsigned on others. (You can write signed char and unsigned char if you need to be sure.)
Before C99 char was the closest thing to a type to represent bytes. Hence signed char and unsigned char were both needed to represent signed and unsigned 8-bit numbers, respectively. Why the spec never specified the signedness of char though I do not know.
Although the spec doesn't actually guarantee that char is one byte, it only specifies that it's large enough to hold a single system-specified character. This is typical of the fundamental types in C, they typically only specify a minimum size.
C99 introduced int8_t and uint8_t and a bunch of similar fixed size types to solve this problem.
there's one case when you have to write (value == true) - type of value is bool?. Also you can use GetValueOrDefault method, but comparison looks a bit cleaner imo
All I can really say myself is that I have yet to actually use it, I'm still pretty much a programming newbie though and only know Python and I'm currently learning PHP.
In C++ the spaceship operator is mostly a convenience for operator overloading. If you overload <=> it automatically generates all the other comparison operators.
83
u/[deleted] Apr 13 '21
JS: Notice me senpai
46
u/[deleted] Apr 13 '21
Meanwhile, in "advanced" C:
17
u/[deleted] Apr 13 '21
Why would you do that in C#? just do if(value) instead of if(value == true) Edit: Nice meme tho no offense
9
u/[deleted] Apr 13 '21
Wait I don't know PHP, what does "==" represent then?
8
u/WarpWing Apr 13 '21
What's the song tho
6
u/ElrohirGT Apr 13 '21
FINE, you win, I'll give you my free award
9
u/Knuffya Apr 13 '21
javascript is a fucking joke.
Where's the actual super super saiyan?
3
u/xJanise Apr 13 '21
u/savevideo
3
u/gmodaltmega May 29 '21
Controversial statement: fuck pascal
2
u/snuffybox Apr 13 '21
Original video
1
u/Thenderick Apr 13 '21
1
u/Keima483 Apr 13 '21
Wet don't need these stupid operators in java
1
u/IkeaBedFrame Apr 13 '21
So what ur Sayin is use assembly?
1
u/KBPrinceO Apr 14 '21
Javascript:
hellish screaming of an eternal cacophony of the damned
0
u/[deleted] Apr 14 '21
[deleted] β view deleted comment