❔ Coding Langauges
So I've spoken to a few people about this, and many are recommending I learn C++ before C# as it is much more powerful and the transition from C++ to C# is much easier than the other way round. I was wondering whether anyone could help shed soem light on this
20 Replies
If you want a full understanding of programming, I'd start by learning C, which requires explicit memory management without being overly complex or bloated. Then move to C++ and learn some advanced functions to speed up your C code. After that you'll probably be able to write C# without an issue.
However, if your goal is just to get something done, or get an idea for programming before spending a lot of time learning it. I'd go ahead and just learn C#.
That's kinda what I did, and I haven't found it that troublesome to learn c/c++ after the fact.
yeah, i did it "the other way around" and didn't have any real trouble
what examples did they give for it being more powerful? more explicit in terms of memory management maybe, but that isn't always better
Technically speaking, there is no difference between C# and C++ as both are completely capable and turing complete languages, it's just their ecosystems and support which is different.
It also depends on what you want to program. C# is a really clean OOP language for working with large data sets and/or filesystems. Whereas C/C++ works better at a low level for running algorithms and working directly with binary data.
I mean you can do both things in both langauges.
My goals were to eventually be involved in application/software development or data managment
ultimately your first language isn't super critical
once you learn one many of the concepts apply to other languages
Yeah certainly, but one is still better than the other for those cases. Binary IO (for example) in C# is possible, but nowhere near as well supported or clean as it is in c/c++
No point snaring yourself with C# if binary IO is your only plan, is what I mean
i'm not sure exactly what that means, i've done what i imagine is "binary IO" in C# without any problems
It's not an issue, it's just not as good
C# has streams and binary utilities and whatnot
Yeah which isn't as good as fast as just reading structs into memory
you can do that in C#
Sure you can, but again, not as well as you can in c/c++
you can turn bytes into structs no problem™️
might require an unsafe or two, but it works
Yeah not my idea of fun, anyway, that's getting off topic.
so tl;dr C# is good at some things, C++ is good at some things
Precisely
thanks guys
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.