Should I Learn PHP Before C++ for University?

  • Context: C/C++ 
  • Thread starter Thread starter hasnain721
  • Start date Start date
  • Tags Tags
    C++ Php University
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
40 replies · 21K views
shoehorn said:
Although it's ultimately a subjective matter, I disagree completely with this. I find C++ to be considerably easier both to learn and use than, say, C.

Without wishing to be insulting or start a flame war - then you are almost certainly not using it fully or correctly.

C has a single programming paradigm ( I can't believe I just used that word ) = procedures and only one major gotcha = pointers, and is decribed in a 200 page book.
C++ supports procedural, object orientated and functional programming, has innumerable gotchas across RTTI, multiple inheritance, templates. It comes with a very complex standard library + STL + BOOST. Even a description of these fills half a bookshelf.

C++ is a better language for most large programming projects, but it isn't the palce to learn programming. C is an excellent introduction to how computers work and I believe knowing it is necessary to call yourself a programmer in whatever language. But I'm not sure it's where I would recommend someone start learning programming today.
 
Physics news on Phys.org
mgb_phys said:
Without wishing to be insulting or start a flame war - then you are almost certainly not using it fully or correctly.

Then I'll stop the possibility of starting a flame war by pointing out that you're completely incorrect about this. :smile:
 
To toss my hat into the ring, C++ was my first real programming language. I also don't see any reason to learn C before learning C++ except if you actually intend to use C for something (i.e., don't learn C just as a stepping stone to C++)
 
I started out learning C++ without having done any programming aside from QBASIC when I was a kid. Be prepared that when you start out nothing makes much sense but slowly you will pick up the terminology and begin to understand things.

You've just go to keep cramming in information and some of it will stick.
 
I started on Turbo Pascal in college and it made life very easy. It also gives you good habbits. Then they moved us on to VB6 and I lost everything. I also started learning C which isn't to bad, but not great for starting.
 
chroot said:
C++ is one of the most difficult languages in existence. Have you read the whole thread?

- Warren
Yes I have read the whole thread. However from my experience it was not too hard to learn. It is hard to master, but anything is.
 
Well time to throw MY hat into the ring? I'm not sure about C++ or all of that other jazz, but after having practiced Python for some two weeks I can say I love it. It's easy to learn, and easy to put into practice -- in a few hours you'll know enough to make a script that hunts prime numbers, calculates your finances, or (if you should please) a phonebook.

It's fun learning -- everytime you understand a new concept, you can't help but think of all the programs you could make using the new technique.
 
I hate OOP. It's absolutely awful. Just learn BASIC, then C. Out of curiosity, which OS will you be using?
 
My advice. Learn java if you want it to be your first language, but if you already progressing in C++, java going to make your head blow.

And yes, python is always the good choice unless you still use pentium 2 :p
 
c++ is a major headache if you don't want to be just a programmer, sr programmer, etc...
If you want to just go into IT/academia etc and want to program, it isn't necessary. I would also recommend python, it is what they teach at MIT for intro cs...
there is actually the whole class online for mit open courseware.

thing is you can use python for the web very easily... it goes into the lamp stack (p) ...but you could also use php/perl later on. It will teach you how programming works quicker than c++...

i struggled a bit with c++ is why I am saying this...sorry, I don't want to spend all my valuable time testing and debugging, I am not a CS major... I just need the job done fast. python was a breeze in comparison and gets the job done. php can also *get the job done down and dirty* quickly for the web...