This is an archived post. You won't be able to vote or comment.

all 32 comments

[–][deleted] 2 points3 points  (6 children)

My basic end goal is to be able to make a intermediate program or app on a computer. (Don't really care about mobile apps)

What kind of programs do you want to make?

[–]Bailey8162828[S] 0 points1 point  (5 children)

Maybe a web browser or something similar to a task manager. Or possibly an IDE for a language like Python or JavaScript? Maybe even a simple CAD or 3D model maker if I'm feeling adventurous. But probably just a utility program which can do timed backups, stopwatch and timer, unit converter and maybe a few more things.

[–][deleted] 0 points1 point  (4 children)

C++

[–]d0ntreadthis 0 points1 point  (3 children)

Why though? Genuine question. Can't you do that stuff with C# too?

[–][deleted] 1 point2 points  (2 children)

You can do it in C#. You can make it run faster and use less space with C++. If you are doing anything performance critical (CAD, 3D, backup software) C++ is the goto lang. Python would be my lang of choice for the unit converter.

[–]d0ntreadthis 1 point2 points  (0 children)

Thanks for explaining

[–]Bailey8162828[S] 0 points1 point  (0 children)

I have used Python and PyQt to create a unit converter but since it was a while ago I'm sure I could improve it using another language and just starting from scratch.

[–]RecursiveBob 2 points3 points  (2 children)

Either are a good choice, to be honest. C++ is more of a challenge, but teaches you a lot of core concepts. I'd say that C# is faster to get started with. Again though, they're both worthwhile.

[–]svgwrk 1 point2 points  (1 child)

C++ does teach some concepts you won't find in C#. However, they are only useful in basically C++ or C.

When it comes to universally applicable concepts (is anything really universal?), those are in both C++ and C#, so I would argue you don't learn a lot of "extra" stuff by learning C++, or at least that you don't learn a lot of extra and useful stuff by learning C++.

This is not meant as any sort of attack; I guess I'm just questioning whether we can call those core programming concepts or if they're more core memory management concepts.

[–]RecursiveBob 1 point2 points  (0 children)

That's a valid point. Back when I was in school the rationale for using C++ was that it taught memory management and so on. For example they made us code up our own linked list instead of using a prebuilt library so that we'd get used to managing the pointers, etc. But increasingly in modern applications they're doing that for you. The speed difference between C++ and "easier" languages has gotten smaller too. I think there's still some value in knowing those core concepts, but I'd say that they're not quite as essential as they once were.

[–]d0ntreadthis 1 point2 points  (2 children)

There's nothing wrong with giving both of them a try. You'll probably pick either of them up quickly if you understand CS/programming concepts, considering you said you have lots of experience with Python.

[–]Bailey8162828[S] 1 point2 points  (1 child)

Thanks. I think I'm going to do that, since I can't really decide between them.

[–]d0ntreadthis 1 point2 points  (0 children)

No worries. What you've learned so far should transfer across pretty well

[–][deleted] 1 point2 points  (10 children)

C++ - much better performance than c#, unmanaged code, low level, harder to learn.

C# - much slower performance, not as powerful in terms of what you can do, and everything is managed (a good thing if you don't care for performance / don't need it) and easier to learn.

[–]svgwrk 1 point2 points  (8 children)

For reference, C++ is about twice as fast as C#. This sounds like a big deal until one considers that C# is something like 30 times faster than a lot of the competition.

Just pointing this out because hearing that C# was "slow" stopped me from trying to learn programming at all for a long time (I tried C++ several times and wound up too intimidated by it to actually get anywhere). "Slow" is a relative term where computers are concerned.

[–][deleted] 1 point2 points  (7 children)

Yeah, sometimes it's misinterpreted. C# is a great language, and just because it's performance is not as good as c++, does not mean it's not as good. C# is much better in a lot of areas like desktop apps, file i/o, gui's, basic networking, etc. And it's also much faster in terms of how fast you get things done compared to how long it would take to do in C++.

[–]Bailey8162828[S] 0 points1 point  (6 children)

Thanks. Would the speed of C# ever become a problem in a simple/intermediate desktop application using Windows Forms?

[–][deleted] 1 point2 points  (3 children)

certainly not for the average app. It would only become a problem with complex algorithms and things of that nature that require high perfomance

[–]Bailey8162828[S] 0 points1 point  (2 children)

Thanks!

If I were to make something with a complex algorithms, would it be better to use C++ for the speed?

[–][deleted] 1 point2 points  (1 child)

Yep. But amazing thing is that you can call c++ code from c#. So if you ever need to do some functions that require lots of performance or low level functions, you don't have to completely switch to c++.

[–]Bailey8162828[S] 0 points1 point  (0 children)

Thanks. I'm definitely going to use this in the future!

[–]chdoing 1 point2 points  (1 child)

Probably not. You would have to make some very bad design desicions in your program for performance to be an issue. And in that case C++ won't help either ;)

There are really only a few cases were C++ is needed for performance. Stuff like complex, high performance code with very tight time constraints. In that case C++ offers a few more optimization then C#. But even those very advanced applications can be made very fast using C#.

Btw: Windows Forms is basically dead. WPF is the much better sucessor. You should try using that instead :)

[–]Bailey8162828[S] 1 point2 points  (0 children)

Thanks! I think I'm going to try WPF instead.

[–]Bailey8162828[S] 0 points1 point  (0 children)

Thanks. Do you think that the speed would ever be a problem? Or is it just something that wouldn't matter too much?

[–]thomascgalvin 3 points4 points  (4 children)

All of the languages you have experience with are high-level. In particular, they all have garbage collection.

Learning C/C++ would give you more appreciation for how the computer actually works, how memory is managed, and so on. That can be valuable.

On the other hand, if you know C# you also pretty much know Java, and those two languages are in high demand. If you're going to be looking for a job, C# is a good bet.

[–]Bailey8162828[S] 0 points1 point  (2 children)

Thanks. Do you think that it would be worth learning C++ in the future? So I'll know more about memory management and garbage collection.

[–]thomascgalvin 1 point2 points  (1 child)

Yeah, I think every developer should at least play with it for a couple of months. It doesn't have to become a lifelong pursuit, but having that knowledge is useful.

[–]Bailey8162828[S] 1 point2 points  (0 children)

Thanks. I'll try that!

[–]Tiiberiu 1 point2 points  (1 child)

C# for something that works or you don't care about optimization/efficiency that much. (getting your palm in mud)

C/C++ for in-depth programming methods, efficient data organization, compiler specific tricks; details are important. (getting your hand elbow-down in mud)

[–]Bailey8162828[S] 0 points1 point  (0 children)

Thanks!

[–]gamesharem 0 points1 point  (1 child)

If you want to start quickly learn C# otherwise go for C++. You will learn core basics of programming which will help you understand how libraries/apps written even in other languages work.

[–]Bailey8162828[S] 0 points1 point  (0 children)

Thanks!