Shift from Java to c++

后端 未结 16 1006
执笔经年
执笔经年 2021-02-05 10:49

I have been developing applications based on C# (.net) and Java (J2EE) for the last 3 years.

But now I feel, Java, C# makes you lame (from learning point of view) and yo

相关标签:
16条回答
  • 2021-02-05 11:38

    It sounds like you're avoiding the first mistake most people make, which is assuming the new language is the same as the old one. C++ is different and should be learned as a neww(-ish) language.
    A reference I would suggest would be C++ How to Program which is used at my University for the introductory C++ classes.

    After that, then look at previous Java software that you have written and seeing how you would translate them to C++. The syntax can easily be referenced from CPlusPlus.com. While doing this, it is important to keep in mind what all the different syntax represents, and how it changes what is going on in the software (i.e. The differences between the two languages). This has the added benefit of allowing you to see how the underlying architecture is represented for both languages (and for programming languages in general). I don't know of a good book that explains how programming languages work under the covers, or I'd recommend that.

    If you are, however, interested in learning how programming works, then Assembly language would be a good place to start. Assembly language for Intel-Based Computers is what I used to learn assembly language and it was very useful.

    0 讨论(0)
  • 2021-02-05 11:42

    Assembly Language.

    Start with the Z-80. Then add 'x86. Then try 68000. Then the TI 320 series of DSP. You might also wish to add the Z-8. Just to see how different machines do it.

    0 讨论(0)
  • 2021-02-05 11:43

    I disagree with the sentiment that you need to learn C or assembly language first. C++ and C may be similar in theory but are very different in terms of practical use. One gains little to nothing in the way of C++ idioms by using only C, and while it is good to have practical experience in multiple languages, it's an exercise in futility to specify prerequisites in language learning. I think the best way to learn the concepts of programming is to sit down with someone who understands them well and just talk about it, be that on StackOverflow, in forums, or, if you're lucky, in person.

    At the end of the day, I think programming really isn't all that hard, and you may need someone to explain it right just one time to have everything click. It's all about rehashing the same simple concepts over and over to build complex and beautiful machines.

    0 讨论(0)
  • 2021-02-05 11:43

    Whatever you start off with, my suggestion would be dump the full fledged IDE's. Use good text editors (vim/emacs)

    The learning curve is better when using text editors since everything needs to be written on your own. No prompts and no pre-written code.

    You have all the best answers above, in anycase. :)

    • Ivar
    0 讨论(0)
  • 2021-02-05 11:44

    For learning c++ I reccommend reading C++ for Java Programmers by Mark Allen Weiss. It helped me alot when moving from Java to C++ as it is very good at highlighting the differences between the languages.

    0 讨论(0)
  • 2021-02-05 11:44

    Learn C and C++ at the same time, I'm talking from experience here. Very often I come across code that mixes C and C++, so it's better to know both and their differences. Pick up K&R for C (understand pointers, header files and manual memory allocation and cleaning...which are not used by Java!) and any decent C++ beginner book (I picked Prata, but whatever you are more comfortable with). Practice the same examples doing versions of C, C++ in a sequential fashion, object-oriented (OO) fashion, generic/template fashion etc. C++ has a larger standard library than C: templates, STL containers (no need for pointers, but you can do pointer fine tuning writing your own container), threads (since C++11). You can always use C if you have no choice (or Boost libraries), any C++ compiler will allow it.

    If you come from Java you should already know OO concepts for C++, and, perhaps, some generic programming as in C++ templates. C++ is mistakenly regarded as an OO language, but it's more than that. BTW, objects are a dynamic concept (runtime), whereas templates are static (compilation time), so learn the language CONCEPTS, not just the syntax! Once you learn the concepts read Stroustrup's book (he created C++) to learn his philosophy for the best design rules for C++ code.

    Learn the latest C++ standard (C++11) as it adds many new things to the language (auto, nullptr, threads, lambda functions, new containers, etc.). Last but not least, please use Doxygen in C/C++ the same way you used Javadoc....there is nothing worse than undocumented, unreadable code no matter what language you're using.

    0 讨论(0)
提交回复
热议问题