Is C++ going to be helpful in this stuff?

I initially started learning to program so that I could build websites, etc… by myself. I found C++ the most comfortable language for me because of the fact that it had only a few features and it wasn’t too fancy, so I didn’t have to memorise much. Now, after a while, I doubt my decision, I am slowly learning Python, which is a very easy language, the thing which is bothering me is that I’ve discovered that C++, the language I am most comfortable with does not have much use outside of low level stuff and that it’s not suitable for Web or App Development. I am also not sure what language should I transition to, Python seems a bit too easy, and I feel like I want to use something else. I have been wondering about JavaScript, Kotlin, PHP or Java for a while now thanks to this. I want to find a balance that is simple but not excessively abstracted. Also, is it possible for me to figure out a way to use C++ for App development or so? In that way my skills in C++ won’t go to waste. I did see something along the lines of “App Development with C++” while installing Visual Studio Community. Will it be way too hard or not worth the effort? I’m sorry if that’s too many questions.

if you want to do web development you will need JavaScript

you learning C++ is never going to waste, learning programming is more than just learning the syntax of a language

2 Likes

Do you mean C? Because “only a few features” and “C++” don’t quite go together. It famously has a huge surface area and is by this point in time basically three or four complete languages glued together

Are you sure about that? C++ has libraries for literally everything you could possibly want to do. However

To build websites you basically only need HTML & CSS. To add interactivity on the client side, the API that allows that uses JavaScript. Websites, as in the bit that the user sees in the browser, don’t use anything else at all. You can’t program a website in C++, or Java, or Python, or Kotlin, the only programming language they understand in that respect is JavaScript (any language can potentially be compiled to JavaScript, and all of the ones I mentioned there can be, but that has to be done before a browser understands it).

What do you mean by “app development”? A huge number of all applications in existence are written in C++, so it’s clearly possible. Google brings back thousands and thousands of solid results for “app development C++”. It has been a (if not the) major programming language for decades. Almost every GUI library, windowing library, renderer etc is written in the language. Yes you can build applications with it.

But if you’re talking about web applications, the client-side bit, you probably need JavaScript. You can compile C++ to a strict subset of JS called WASM just fine, so you can build apps that way (Figma is an example of this, though afaik it uses Rust not C++), though the tech is only coming out of infancy atm, is somewhat restrictive (no threads or GC atm) and you still need to write JS glue code to make it all work. WASM will only gain ground though, so is a good thing to learn. It is useful and important for any type of application that is computationally heavy (eg games).

If you’re talking about web development w/r/t server-side web applications, it doesn’t matter what language they’re written in. I’m not sure why you would want to use this type of language for the whole thing – people seem very keen on doing it in Rust, which is the same level, and I just do not see the point when frameworks in higher-level languages exist and work perfectly fine and are much more ergonomic, but if C++ is your language then fill your boots. To be fair, you can do fairly amazing things with a language that can work at an extremely low level: this being a recent example which to me is just black magic.

If you mean mobile application development, then most of the core stuff on any of their OS’ is written in C++ anyway, but the OS manufacturers (Google, Apple, MS, in the past Palm, Nokia etc) tend to make use of another language or languages above that (either a one that already exists or one they’ve made). You can write apps in C++, but in many cases it might not be a terribly ergonomic experience. Generally it’s going to be easier to use a higher-level language: the companies either wrote libraries for languages or wrote the languages themselves specifically to make it easier to build stuff for the platforms. Android primarily used Java, recommended language is now Kotlin. IOS primarily used ObjectiveC, recommended language is now Swift. Alternatively, you use a cross-platform library: for example React Native, which uses JavaScript.

3 Likes

Thanks so much! Some of the videos that I watched said that C++ is very bad at anything close to web development, etc… and that it’s only used in creation of Operating systems, etc… So I was quite worried.

I also like using C overall, but when I was learning C++, I learnt that it was like C in nature and that it was overall limiting when it came to the features, so I’ve been limiting myself to using features common in the 2 languages and a few extra things in C+ + like OOP and Exception Handling.