Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Just choose one and start. Either is fine and there is no "right" answer here.
 
Which works the same way and avoids the pitfall you mentionned ? Maybe you should go back to learning C before you try to make examples showing how it's "lesser" than other languages. ;) Do hashes next! :D

Congrats on missing the entire point of the example. Read the next paragraph.


What you say C makes hard (lack of certain complex types) makes C the best platform to learn. Let's say our new guy learns right in Objective-C, having NSString and NSDictionary to manage all of his string and hashing needs. What happens when he goes to Java ? [string isEqualToString: otherstring]; isn't there. He needs to relearn it all.


Again, it's not about learning exact way to do things in this language or that language. You are 100% correct that there is no "isEqualToString" in Java. At the same time, there is a ".equals()" method that accomplishes the same thing. The core concept, an object method that you can call to compare one sequence of characters to another is EXACTLY the same, there isn't anything to "relearn". As you said, it's just a syntactic difference.

I've trained and watched over dozens of new programmers during the last 12 years of my professional career. The ones that do the best are the ones who can actually see returns on their work immediately instead of fighting with cryptic memory management and often obscure error messages and warnings (not to say Java stack traces are 100 percent clear to a newbie or even anyone).

Edit:

To be fair, I noticed I used strcmp instead of strcpy in the original post. One of the pitfalls of typing way after my bedtime. My apologies for the confusion.
 
Last edited:
Personally I am going to learn C++ only because that is the only language they teach at my school, but someone told me it was the best place to start. I'm an apple fanatic as well and I thought it would be a good base to start with I'f I ever decide to start with iOS,Then go on to objective-c.
 
Both are excellent options, and the language that's best for you to start with depends on how you learn best. An analogy might be that learning C first is a bit like learning how to do art by first starting with a pencil and paper and learning the fundamentals, slowly adding one color at a time, learning color theory, then progressing to paints, etc. Starting with Python is a bit more analogous to going straight to the acrylic paints and making a big beautiful mess, learning how to make things without necessarily having evolved all of the knitty-gritty art theory knowledge that is underpinning the work you're doing.

To be a great artist it's important to learn the theory eventually, but some will never discover the joys of painting if they can't make it through the months of charcoal sketches of fruit bowls, whereas others thrive on a ground-up approach. You will almost certainly want to learn C eventually, but the direction you take comes down to your learning style.
 
Start with C/C++..

For a start, get one of those San's Teach yourself C/C++ books.

They're really good to start with.
 
I recommend Java, as always. It lets you focus on the essentials and is relatively easy to learn. There's also a lot of learning material on Java. A lot of colleges use Java in Programming 101. There is a reason for that.

Python would be my second choice, but I think Python would have been very confusing for me as a first language. I have considerable doubt that multi-paradigm languages are optimal learning languages for beginners.
 
Hey guys,

I've been wanting to learn to program for a while, but I can't decide which language to learn. I've seen arguments for C and for Python. Most people saying C is a best first language say it teaches you more about programming and computers. Most people saying Python is the best say that it is more powerful and more practical than lower level languages like C.

Learning C as your first ever programming language is not going to be easy unless you already think like a programmer.

Pointers will confuse you, and details like linking and header files will get in the way of actual learning.

Start with something like Python, or for a bigger more complex language, try Java. Java is EXCEEDINGLY easy to learn, and has a gorgeous syntax. Not to mention, there are examples galore. Find websites from intro CS classes taught in Java/Python etc and do the labs.

Here's somewhere to start with Java. If you go through all the labs on this page, you'll be well on your way. http://www.cse.wustl.edu/~cytron/101Pages/f09/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.