Normally, functions are declared by stating their return type, followed by the name and the parameter list, plus the function body (the latter two is what makes them functions). There is no special keyword required, and the double arrow notation isn't a thing either. I'm only aware of a single arrow (to access members of a pointer) and the shift operator (>>), but of course C++ does allow you to overload operators and I believe even declare your own.
Post
Remote status
Context
10Normally, functions are declared by stating their return type, followed by the name and the parameter list, plus the function body (the latter two is what makes them functions). There is no special keyword required, and the double arrow notation isn't a thing either. I'm only aware of a single arrow (to access members of a pointer) and the shift operator (>>), but of course C++ does allow you to overload operators and I believe even declare your own.
The fact that basically everyone who saw this post actually thought that this might be valid c++ even if just for a split second makes me unbelievably happy
Can't fool me, son. I was learning C++ back when you were still shitting your diapers.
I am so sorry man I didn't know that happened to you
It's okay man, I've gotten over it
You can tell this guy is off the deep end with this shit. Pure hatred in his voice.
https://www.youtube.com/watch?v=7fGB-hjc2Gc
Don't much care for OOP in general either. Esp not using "patterns" fucking everywhere.
"Object-oriented programming is an exceptionally bad idea which could only have originated in California." - Dijkstra
C is a fine language.
OOP is fine unless you overdo it like Java does. The best languages I know all use a hybrid object/functional approach.
But there seems to be a generation of devs trained on Java who want to squeeze in some pattern or another everywhere.
The tricks aren't even that complicated either!!
And you get control over when dereferencing happens! It's the best of all worlds.
Replies
1I do not "dereference", I reserve 512 GB of virtual memory. And if I leak memory, I CRASH.