Safe code is a skill, not a feature.
Programmer Humor
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
i will never forgive C for making the type syntax be
char* args[]
instead of the much more reasonable
&[char] args
it also bothers me that char* args[]
and char c
are “the same type” in the sense that the compiler lets you write
char c, *args[5];
with no problems. i think the C languages would be way easier to learn if they had better type syntax. don’t even get me started on C++ adding support for
auto fn_name() -> ReturnType { … }
@affiliate Hey, you didn't even mention that char *args[]
actually means char **args
in a parameter list.
god, what a beautiful language. it brings a tear to my eye
Strictly speaking, it should be
Unsafe block syntax in C++
{ ...}
That is why I use just int main(){...}
without arguments instead.
Any void main(){...}
enjoyers?
int main(void) { . . . }
for me!
besides not requiring a return value, what difference does it make?
@stebo02 @Bogus5553 Neither of them require a return value, but void main
isn't legal C++.
yeah I thought so, does it work in C?
It will also give an error if you try to add a return value anyways.
while (true) {...}