When learning new languages ​​related to reading, distraction or AIDS?

When you learn new languages ​​like C ++ from PHP, do you read other snippets in other languages ​​so you can understand better, offering a different perspective, or do you do it to confuse a noob like me? Also, any advice on learning C ++ would be great.

0


a source to share


3 answers


I find reading short snippets helps. A good book is really handy. Once you understand most of the language, reading large, full-blown programs helps you learn how common problems are solved in that language. Most languages ​​don't have a term for this, but it's similar to the "Pythonic" way in Python.



When it comes to learning C ++, first get a good understanding of C. C is pretty simple, so it doesn't take that long. Once you learn C, start learning C ++ specific functions one at a time. That way, you can still write useful programs (C is basically a subset of C ++) before you learn the real "C ++ ic" way.

+2


a source


I find it helps

  • Get a good grasp of the syntax and semantics of the language by looking at the SIMPLE examples and linking them to something you already know
  • See what libraries and design patterns are in common. Find out why they are common. Was the language designed to encourage them? Is this a convention? Effective?
  • there is an idea that you want to implement in this language. This will give you a goal and some perspective.
  • Have a look at the other code once you are comfortable with understanding and reading it, and comfortable with the original layout, conventions, common names, etc.


I find it best to dive into the head. Get feedback from people if possible. The most important thing:

don't be afraid to make mistakes , they make up a large part of the learning process. And try to associate things with concepts that you already like.

+2


a source


If you are inexperienced enough to ask this question, I recommend that you read short passages, but not in another language. The best mental exercise is to say, given a short snippet of the new language (C ++), how will it compare to what you write in the old language you already know (PHP)? Likewise, if you are reading about a new C ++ thing, ask what pieces of PHP you can express in the new C ++ way.

As far as C ++ itself is concerned, there are many other SO questions to trawl. I think I reiterate that the four-author Design Patterns book is very useful to learn the vocabulary and thinking of many longtime C ++ programmers.

+1


a source







All Articles