>C is better than C++
>[Language] is better than Haskell
>>61831391
Language wars are lowest form of technological discussion.
>>61831782
perfect for me since i'm the lowest for of human life
>>61831391
C++ is objectively better, just look at the name
>>61831782
Agreed. Except when someone is rushing to acknowledge the supremacy of my beloved language waifu Haskell.
>>61831391
now add some life bars into it
>>61831856
/thread
>>61831412
There's always a meme language mentioned in these threads, you guys should make a /mlg/ so you can talk about your languages there and the rest of the board can talk about languages people actually use
>>61833947
reee i did this to my phone
>>61831391
the art in the new fate series looks too real
>>61831391
C++ > C > C++
>>61833970
Reeeeee-tard
C#
#include <stdio.h>
int
main(void)
{
char c = 0, cpp = c++;
if (cpp > c)
puts("C++ > C");
else if (cpp < c)
puts("C++ < C");
else
puts("C++ = C");
return 0;
}
>C++ < C
>>61834615
>>>/reddit/
>>61834571
This, sort of
You have more options in c++, but a shitton more pitfalls
Like going pure oop
>>61831391
kys yourself
>>61834766
It's worse when you're working in a team.
I just stumbled on to this gem at work today:int16_t buffer, *p_buffer = &buffer;
p_buffer were used once in a function that sets the value for buffer.
Does anyone know what could possible justify this over just using&bufferwhen needed?
>>61834868
There are some use cases. Depends on what you want to do.
If there are some other int16_t variables you could use p_buffer to point to them if that's what you want.
Or maybe you want to do something specifically with a variable that holds an int_16t*. Maybe there's a function that takes an int16_t** to modify that pointer in some way.
If this variable is only used to pass &buffer to a function, then yeah, there's no justification. Depending on the compiler it might even lead to an unnecessary store and load into a variable. Maybe the author was a noob and didn't understand pointers very well.