Why can’t C++ create it’s own prototypes

I’ve learned a lot of languages in the last 18ish years of programming. I’ve learned and used Java, Perl, PHP, VB.NET, Javascript, Alice, Actionscript, Golang, Scala and more. Now I am learning C/C++ and I come across this thing that C++ calls function prototypes.

Apparently you need to create the prototypes and then create the functions. What I find odd is it is 2023 and the language doesn’t have any way to do this mindless BS on it’s own? Like it can’t inspect the files I write and see the method signatures and copy them into whatever it needs for itself? No we must make the user waste mass amounts of their time doing this mindless BS. WTF? This makes no sense to me.

How hard would it be to implement such a functionality? Is there some specific reason for this? This adds lots of overhead to the programming process. Now instead of just refactoring a function, you must also refactor its definition which apparently goes in a different file all together. Who planned this BS out and why? I simply want to know why, you would design a language in such a way that it wastes more of a programmers time than necessary.

I’m sure I will find other idiotic crap as I learn more C++, but this one is confusing so far. Honestly after using Java this makes no sense to new comers. It is inconvenient and wastes precious time. I now see why people complain about C++ it is like a finicky little deaf mute, special in it’s own non helpful ways. If you read the comments in the link above others have come to the same conclusion that it makes no sense to add extra overhead to a programmers work. NONE. There is literally no good reason that C++ can’t fix this and stop being a POS. Arduino uses a subset of C++ where you don’t have to worry about prototypes, but C++ can’t do that yet.


Oh well it is what it is. But I still like it better than the Satan spawn known as Python. I’m sure there might be a reason, but I can’t find it on the googlenet yet. There has to be a solution to this. I hate wasting time doing nonsensical bullshit. I could create something that does it before calling the compiler I guess. Maybe there is a VSCode plugin? I’d hate to create a large app like this. I can only imagine what a pain in the ass refactoring is.


Posted

in

by

Tags:

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: