logo elektroda
logo elektroda
X
logo elektroda

C++ or C# for Beginners: Starting Your Programming Adventure & Comparing Job Opportunities

ptb55 9585 27
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15700875
    ptb55
    Level 7  
    Which of these two languages (C++ or C#) do you recommend for starting your programming adventure? I heard that nowadays there are more jobs for programmers creating in C# but in turn C++, you know, you need to know it at least a little. I'm wondering where to start and which to focus on in the near future, which one is better for a beginner, and which one to put aside for the future. Thanks in advance for your comments.
  • ADVERTISEMENT
  • #2 15700921
    marcinj12
    Level 40  
    ptb55 wrote:
    C++, well, you know, you need to know it at least a little
    Why "must", who says so?
    For a beginner: C# without a doubt.
  • #3 15700976
    ptb55
    Level 7  
    And when it comes to possible future professional work, let's say knowing only C ++ can you manage? Would it then be necessary to learn C# in most cases?

    And anyway, is there a big difference between C# and C++, or is it rather easy to switch from one to the other?
  • #5 15701269
    marcinj12
    Level 40  
    As a friend mentioned...

    I will add that in my opinion employers either look for people who already have commercial experience in a certain language, or beginners... They require the former to be able to join the work relatively quickly (and at no cost), with the latter they hope that learning it will take them some time to program.

    If you get to a company where for 10 years you will only be programming in C++ in the ABC tool an application for video processing for a real-time system on Linux, then after 10 years this knowledge will not be much appreciated if you want to, for example, move to work in a company that writes in C # in the XYZ tool for desktop applications for a business client.

    Also, you can change, and yes, you can always, the only question is whether the potential employer will be willing and able to afford such a thing...
  • ADVERTISEMENT
  • #6 15701355
    Pucek84
    Level 9  
    I'll throw in my 5 cents
    if you want to treat this beginning of programming as "fun" and "testing your strength" start with C#
    1. compared to C++ is much simpler
    2 .Net (which you will probably write in this language) is a well-organized platform that allows you to quickly develop applications
    3. Development tools give a great "user experience" and allow you to easily create applications with a graphical interface (Visual Studio c # express) which is fun to learn.

    If you have ambitions to learn more languages, develop further in programming and you know that you will not be discouraged even if the beginnings are difficult, start with C ++
    1. It will allow you to learn more programming concepts (such as friend classes, working with pointers, multiple inheritance) that are either not present in C# or their use is "advised against"
    2. Knowing C++ it's relatively easy to learn C#, pretty much the same syntax, many aspects of C# is a narrowed down C++

    Hope I helped you make your decision :)
  • #7 15701430
    ptb55
    Level 7  
    That C++ is more difficult is not that important to me. It is mainly important to me to gain as much experience and good habits as possible from the very beginning, which will prove helpful in the future if, for example, I want to try another language.

    And do both languages apply in slightly different fields, e.g. in programming industrial robots, automation, etc.? C # was created on behalf of Microsoft, I heard that it is a language mainly for Windows.
  • #8 15701469
    Pucek84
    Level 9  
    1. This is how they are used in various fields: C # primarily for programming for .Net, most often used commercially for programming high-level applications, programming in the business logic layer, user interfaces, access to databases. C#'s strength lies in the .Net platform and libraries.
    C++ is "lower level" (closer to the hardware) so in theory it will perform better in applications where performance is critical. C++ is more universal (it is used in many areas).

    Dedicated languages are used to program industrial robots (RAPID, KRL, PLD2, ...), practically every manufacturer has its own.

    2. C# and .Net were created not so much "on request" as "by" Micorsoft, but the .Net platform is now open source and under linux you can also program for .Net (MONO project http://www.mono-project. com/)
  • #9 15701504
    Pucek84
    Level 9  
    ptb55 wrote:
    That C++ is more difficult is not that important to me. It is mainly important to me to gain as much experience and good habits as possible from the very beginning, which will prove helpful in the future if, for example, I want to try another language.


    Then start with C++ and the book "Symfonia C++" by Grębosz

    C++ is a compiled procedural language.
    If you want to learn broadly understood "programming", it is also worth learning some scripting language (e.g. python or perl) and some "other" one, e.g. functional like SCALA or PROLOG logic programming

    turlam.dropsa wrote:

    Your question is like: I want to become an engineer, what kind of screwdriver should I learn: flat or Phillips?


    Your answer is like: I have nothing sensible to say, it will make a post.
  • #10 15701637
    tzok
    Moderator of Cars
    The most important thing is to learn to program, and the language is a secondary matter ... it's like speaking - in order to speak a language, it's not enough to learn the words.

    To simplify the above statement, C++ is an object-oriented, or procedural-object-oriented language, procedural is C. Do not confuse (ANSI-)C with C++ because they are two different languages. The desire to develop good habits is noble, but the desire to "gain as much experience as possible at the beginning" is naive to say the least - experience is something that comes with time and practice. You can't have everything at once and at the beginning. C++, Java, C#, PHP are all "C-derived" languages... so where should you start?
  • ADVERTISEMENT
  • #11 15701823
    JacekCz
    Level 42  
    C # is a new generation language and they approached its security, for example, by eliminating dangerous things. Microsoft's official manuals compare it to C++, but that's the idea of the lawyers. The first "version of C#" was called "J#" and was a completely new take on Java. This path was blocked by a lawsuit, the elders remember. Very nice language/environment, doing 10 years later in a fresh way they turned some Java ideas in the right direction.

    Java and C # have been designed so that the young programmer quoted here (educated on a mass scale at school and private at work) effectively enters programming in a corporation. With comprehensive libraries, it sets the way of thinking. Both languages are good, I practice them professionally and (more or less) this is the future (although I'm old C/C++)
    (While the vision of the funders was corporate, the languages are very good - I present it to capture the differences of languages)

    C++ is a language from the era of genius hackers with passion in plaid shirts. You have to know it and cultivate it very well or not at all. I mean, it's easy to become a bad C/C++ programmer. It's easy to shoot yourself in the foot, or even get into the habit of shooting yourself in the foot.
    And the library ... well ... the standard is, for example, std::string, but the environment did not have the strength to enforce this standard (example? Arduino). Number types for business, date, etc. refused to standardize at all "because it will limit the freedom of the programmer". In practice, every better library re-implements its string.

    I see. It is deeply misleading to say "C-like language" because it has the same spelling of parentheses. Many PHP learners then seem to know C until the first deep failure. I've been hiring these.

    EDIT: personally, I am deeply indignant when school programs see teaching from C / C ++. I think so fast
    EDIT2: the mythical speed advantage of C++ code (cf. C#/Java) in real high-level programming by a real programmer (event bubbling, perpetual allocation and freeing, etc.) does not exist in practice. Let's add extremely ineffective, for example, conversions that programmers use.
    EDIT3: in C# and Java we talk about "ecosystems" cohesive in a virtual machine environment, e.g. alternative languages fully compatible, strong vision of "how to do what" recommendations. It is educationally beneficial.
  • #12 15701930
    tzok
    Moderator of Cars
    ...which doesn't mean that you can't develop bad habits in C#. The most "purist" of popular languages is probably Java.

    JacekCz wrote:
    Many PHP learners then seem to know C until they first fail miserably.
    I've written it before but I'll repeat it - it's not about learning a programming language, it's about learning to program. so-called PHP "developers" are usually ordinary coders, aka. code makers, not programmers. Coders in corporations have such strict guidelines that one might consider whether it would not be possible to write a parser for these guidelines, which would be generated by the necessary code itself...
  • #13 15702368
    JacekCz
    Level 42  
    tzok wrote:
    ...which doesn't mean that you can't develop bad habits in C#. The most "purist" of popular languages is probably Java.



    I think that as you called "purism" I like this word, on the one hand it results from a rich, basically full library, on the other hand this something immeasurable, written and unwritten rules that are passed on.

    Eg in PHP: every exciter Ooooooo programmer has to write HIS "better" equivalent of anything, ajax, xml parser, cms, everything.
    The same approach in C#/Java would be embarrassing.

    The two "new" languages compared to C++ are not perfect, there are no ideals, but I have deep respect that the "ecosystem" forced the standardization of libraries and even the "way of writing".
  • #14 15705263
    marciniaczekbob
    Level 11  
    I will tell you this:
    C++ is a universal language, you can write almost anything in it, for any platform. But if you already learn it to the end, the worst thing is to learn it a little bit. This language is slowly falling out of use, now only game engines and systems are written in it. Nevertheless, I recommend it.

    there is not much to say about C #, it is unknown what, anyway, like everything from ms.
    From scripting I recommend it, modern, fast, and easy (at least in my opinion)
  • #15 15705278
    JacekCz
    Level 42  
    marciniaczekbob wrote:

    From scripting I recommend it, modern, fast, and easy (at least in my opinion)


    While I agree with the rest of the message (C++ well or not at all, extinction), I'll emphasize C# is not a scripting language (although you're not the only one who misstates that)
  • #16 15706008
    marciniaczekbob
    Level 11  
    I just now noticed how I wrote it, I meant "go" language link
  • #17 15706087
    wiesniak
    Level 31  
    marciniaczekbob wrote:

    there is not much to say about C #, it is unknown what, anyway, like everything from ms.

    Nonsense.

    C# is a very neat language with the .NET platform behind it. With its help, you can easily create console and window applications, system services, web or mobile applications. Just run the free Visual Studio 2015 Community and select the appropriate type of application.

    I have been working with .NET for a few years and I can easily recommend C # for the beginning of learning.
  • #18 15706164
    JacekCz
    Level 42  
    marciniaczekbob wrote:
    I only noticed now that I wrote it, I meant "go" language link


    Now clear :)

    wiesniak wrote:
    marciniaczekbob wrote:

    there is not much to say about C #, it is unknown what, anyway, like everything from ms.

    Nonsense.

    C# is a very neat language... I can safely recommend C# for the beginning of learning.


    I support. Very consciously designed language (environment)
  • #19 15706617
    marciniaczekbob
    Level 11  
    C# may be an easy and neat language, but it's only suitable for writing applications, and only for Windows (maybe not only, for example, in unity you can write in it), for example, you can't write a game engine in it. C# is not a language of the future, and in my opinion it is not worth learning, and certainly instead of C++, which is much better than C#.
    Knowing C++, you don't even need to learn C# to make a simple application in it, the basics look almost identical.
  • #20 15706654
    marcinj12
    Level 40  
    marciniaczekbob wrote:
    C# may be an easy and neat language, but it's only suitable for writing applications, and only for Windows (maybe not only, for example, in unity you can write in it), for example, you can't write a game engine in it. C# is not a language of the future, and in my opinion it is not worth learning, and certainly instead of C++, which is much better than C#.
    Knowing C++, you don't even need to learn C# to make a simple application in it, the basics look almost identical.
    I haven't read bigger nonsense for a long time, but I don't have time to argue with a "fanatic", especially since the result is known in advance ...
    I see that my friend is programming microcontrollers in C - this explains a lot about recommending the "only right language" that you know.

    I advise the author of the topic not to suggest the above entry
    .
    And certainly not interested in the GO language - a niche for enthusiasts, completely useless later when looking for a job. This, for the moment, seems to be "a language without a future".
  • #21 15706666
    JacekCz
    Level 42  
    marcinj12 wrote:
    I haven't read bigger nonsense for a long time, but I don't have time to argue with a "fanatic", especially since the result is known in advance ...
    I see that my friend is programming microcontrollers in C - this explains a lot about recommending the "only right language" that you know.

    I advise the author of the topic not to suggest the above entry


    You were faster, I wrote basically the same thing, but it took me longer to exchange words that would have to be punctured :)
  • #22 15706693
    wiesniak
    Level 31  
    marciniaczekbob wrote:
    for example, you can't write a game engine in it.

    And who will forbid me?
    marciniaczekbob wrote:
    C# is not a future language

    Any rational arguments to back it up? I haven't noticed that I've been running out of work lately.
    marciniaczekbob wrote:
    Knowing C++, you don't even need to learn C# to make a simple application in it.

    Knowing C#, you don't even need to learn C++ to make a simple application in it...
  • ADVERTISEMENT
  • #23 15706749
    marcinj12
    Level 40  
    marciniaczekbob wrote:
    for example, you can't write a game engine in it
    Apart from the fact that 99.8% of us will never have such a need (and development companies from "big" games buy ready-made engines), here's the first example from google for a free (sic!), multi-platform (sic!) engine games (sic!) in C#:
    http://xenko.com/
    I will not mention something as mature as XNA - a platform for writing games for PC, XBoxes and mobile phones...
    I'm not saying that these are some super-extra efficient and optimal solutions because I don't play with them - but they are and are commonly used.
  • #24 15706778
    JacekCz
    Level 42  
    Engine ....

    In C# (the .NET ecosystem) there are different (much greater) possibilities of integrating "hard" code (compiled into a core, always present, let's call the engine) and "soft" code (in a broad sense interpreted, dynamic, installation-dependent).
    Unless I'm a game developer or even a user (yes, I don't take more than 3 minutes to digest this), a very similar topic is called "business rules".

    So the very division of architecture into "engine" and "rest" is created differently and other words than "engine" probably appear. Whole subsystems, significant on the market, have architectures with this type of dynamics. But this is where we start to move away from the "beginner" question.
  • #25 15707189
    marciniaczekbob
    Level 11  
    marcinj12 wrote:
    And certainly not interested in the GO language - a niche for enthusiasts, completely useless later when looking for a job. This, for the moment, seems to be "a language without a future".

    That's what people said about C# back in 2001.

    And I don't even want to answer the rest, because I see that only "fanatics" of C# speak here.
  • #26 15707322
    marcinj12
    Level 40  
    marciniaczekbob wrote:
    That's what people said about C# back in 2001.
    Really? Because I remember that the .NET platform, at least from version 2.0, was immediately well received, thanks to which there was a quick "boom" for this technology. If they've said anything, it's at most that it's a Microsoft "clone" of Java, which was already a fairly well-established language back then.
    And you recommend the GO language - existing on the market for a good 9 years, but still not very popular, used from what I read only through Google, and syntactically dissimilar even to C. A "great" choice for a beginner, especially if he later wants to learn another a C-like language.

    marciniaczekbob wrote:
    I see that only C# "fanatics" speak here.
    These C# "fanatics" not only cite rational arguments, but also had - probably mostly - experience with both languages and have something to compare ... You can say the same thing, did you program something bigger on the .NET platform or did you assume in advance that it is "be" because it's from Microsoft?

    So far, you haven't provided any rational arguments (except for a few commonly repeated stereotypes that are either untrue or outdated) for a colleague who - let me remind you - wants to learn programming, start with C++, not, for example, with C#. This approach was used a dozen years ago, when there were not many alternatives and C++ shone in salons and is still valid, for example, at universities, where "old" lecturers will not learn new, "whimsical" languages... Fortunately, slowly and it changes. Unfortunately, C++ is easily discouraged if you start with it.

    And just to be clear - I'm not saying C++ is "worse" at anything - no sane programmer should favor one language over another. There are simply applications where language A will work better, and where language B will work better. C# is better for learning from scratch, which is much easier to learn and faster to write in because of the richness of libraries. So much for the topic.
  • #27 15728283
    Hyde911
    Level 24  
    These arguments over the superiority of one programming language over another are ridiculous.
    Language is just a tool, and the truth in my opinion is that you can't call yourself a professional if you only know one.

    marcinj12 wrote:

    J. This approach was used a dozen years ago, when there were not many alternatives and C++ shone in salons and is still allowed, for example, at universities, where "old" lecturers will not learn new, "whimsical" languages... Fortunately little by little it changes.

    Probably at the Higher Schools of Cooking in Gaza. At most universities, including renowned Western ones, C/C++ is still used in the early stages of learning and this will not change soon.
    The wealth of libraries means that we do not have to look under the hood, and without understanding "how a computer works" there is no conscious programming.

    marcinj12 wrote:

    Unfortunately, C++ is easily discouraged if you start with it.

    Who said everyone has to be a programmer?
  • #28 15732741
    WalkerEr
    Level 9  
    The rule of thumb is that if you understand and master C++ well, any other language will be a matter of weeks for you.

    My mentors used to say that everything starts with C++ and I can agree with that.

    * For starters, I recommend you books "Jerzy Grębosz - Symphony ISO C++ Volume I, II", a perfect introduction for a beginner, in a pleasant message and reads really quickly, simply draws you in. In addition, after each section there are exercises to do to test your knowledge, something beautiful. I've read both volumes 3 times and I don't have any regrets ;)

    By all means, C++ is the best choice to start your programming adventure ;)

Topic summary

The discussion centers on the choice between C++ and C# for beginners in programming. Many participants recommend starting with C# due to its simplicity, user-friendly development environment (Visual Studio), and strong commercial job opportunities, particularly in high-level application development on the .NET platform. C++ is acknowledged for its depth and performance, especially in systems programming and game development, but is considered more complex and less beginner-friendly. The consensus suggests that while C# is suitable for immediate job prospects, learning C++ can provide a solid foundation in programming concepts. Transitioning between the two languages is deemed manageable for those with programming experience. The conversation also touches on the relevance of both languages in various fields, with C# being more aligned with Windows applications and C++ being more universal.
Summary generated by the language model.
ADVERTISEMENT