PDA

View Full Version : Which language to start with



Pages : [1] 2

slats
05-12-2008, 09:23 AM
Hello
I've learned Visual Basic .NET, some Python, and beginnings of Java. And I was just wondering what language I should learn now. The decision is between either C or C++. So I was hoping somebody could give me some insight on which language would be better to learn. Also I am hoping to go to college for Game Development, just in case a certain language would be better for this.

Sorry if this is not the correction section to post this, but I was unable to find a place for introductions. So it seemed like this was the most appropriate place to post this.

-slats

matsp
05-12-2008, 09:29 AM
Almost all games, nowadays, are developed in C++.

To properly learn C++, you will also need to learn C, as 99.9% of all things you can do in C, will work equally well in C++ (of course, purist C++ programmers will say "That's not the way to do it in C++", but the compiler will not make such objections).

However, whilst C++ can do C, you will also need to learn "the C++ way of doing things", or you will still not be particularly successful in the C++ arena.

--
Mats

maxorator
05-12-2008, 09:30 AM
As you're in a C/C++ programming forum, our opinions aren't totally objective I guess.

But as you're here already, I think it would be good to start with C and go on with C++ from there.

abachler
05-12-2008, 09:38 AM
To be fair, some games today are written in python, but thats generally only the server side when rapid development is important and where its fairly easy to throw more iron at the performance issues.

slats
05-12-2008, 09:51 AM
thank you all for the insight I am going to work on learning C.
Generally how long does it take to learn C?

matsp
05-12-2008, 09:56 AM
thank you all for the insight I am going to work on learning C.
Generally how long does it take to learn C?

The basics: A couple of weeks or so. Fully - a few years or so (assuming you "ever" learn it all).

Note also that learning a language is generally considered the easy part - learning how to program is the hard part. So if you are already comfortable with other programming languages, then it's easier. But C and C++ have some advanced features that are different from most other languages (particularly the ones you mention, in the fact that C and C++ uses pointers).

--
Mats

abachler
05-12-2008, 10:00 AM
thank you all for the insight I am going to work on learning C.
Generally how long does it take to learn C?

an afternoon to learn, a lifetime to master.

whiteflags
05-12-2008, 10:04 AM
I've learned Visual Basic .NET, some Python, and beginnings of Java.

I'm not quite sure what that means, but I think you should have a working knowledge of Java before you jump into something else. Nothing quite ruins a mind like trying to learn several programming languages at once, and C++ will be doing things differently from Java which will lead to confusion you're not prepared to handle. When you have a working knowledge of the languages you're already learning, you will have an easier time working with the differences and similarities it has with C++.

maxorator
05-12-2008, 11:28 AM
I, for example, jumped to C++ from PHP.

P4R4N01D
05-13-2008, 12:28 AM
I recommend leaning C first (as I haven't gone into C++ yet). I went from PHP to python to C, where I had learnt the basics of C before python (as I didn't have much time to read the manual).
I have been programming in C for roughly a year now (dived head-first into Windows Programming with little experience beyond pointers).
The concepts are not that hard to master, it is applying them to programs that is the hard part. Another difficult thing is comming up with problems that are feasible, wihtin what you know and time-frame, to program. That might just be me though :).
If you even spend years learning C, then move on to C++, C++ will not take that long to master as most of the stuff in C carries over to C++. Thats the concept I work from (hope it's right)

laserlight
05-13-2008, 12:54 AM
Nothing quite ruins a mind like trying to learn several programming languages at once, and C++ will be doing things differently from Java which will lead to confusion you're not prepared to handle. When you have a working knowledge of the languages you're already learning, you will have an easier time working with the differences and similarities it has with C++.
I agree.

slats, I think you should concentrate on Python and Java for now. Consider developing simple games in those languages. Aside from helping you build your knowledge on how to use those languages to solve problems (and problem solving is a skill that you can keep even when switching languages), the simple games you develop could come in handy in an entrance interview for your target college.


If you even spend years learning C, then move on to C++, C++ will not take that long to master as most of the stuff in C carries over to C++. Thats the concept I work from (hope it's right)
Yes, much of one's C knowledge would carry over to C++. On the other hand, C++ introduces new constructs and idioms not present in C, and some of these are fundamental to using C++ effectively. If one's aim is to learn C++, there is no gain in learning C before learning C++.

slats
05-13-2008, 11:38 AM
I agree.

slats, I think you should concentrate on Python and Java for now. Consider developing simple games in those languages. Aside from helping you build your knowledge on how to use those languages to solve problems (and problem solving is a skill that you can keep even when switching languages), the simple games you develop could come in handy in an entrance interview for your target college.


Yes, much of one's C knowledge would carry over to C++. On the other hand, C++ introduces new constructs and idioms not present in C, and some of these are fundamental to using C++ effectively. If one's aim is to learn C++, there is no gain in learning C before learning C++.

Thank you very much.
I will stick with Python and Java for now.
I'll be back in a few months(or years) depending on when I am done with those.

Thantos
05-13-2008, 01:29 PM
Regardless of the language you choose I would encourage studying different types of programming (I.E. procedural, OOP, logic, etc) as these are the real foundations to programming. Syntax is fairly easy to pickup once you firmly understand then general concepts.

DavidP
05-13-2008, 01:40 PM
I'll be back in a few months(or years) depending on when I am done with those.


I'll still be here :)

manav
05-14-2008, 03:48 AM
slats, I think you should concentrate on Python and Java for now. Consider developing simple games in those languages. Aside from helping you build your knowledge on how to use those languages to solve problems (and problem solving is a skill that you can keep even when switching languages), the simple games you develop could come in handy in an entrance interview for your target college.
Do no discourage people who wish to learn C++.
I think it is perfectly valid and useful to learn C++ even before any other language is learned!

C++ has some really good stuff to ease the newbies!
I will recommend C++ for learning how to program, other languages are more like get your work done, the fastest!

matsp
05-14-2008, 03:51 AM
Do no discourage people who wish to learn C++.
I think it is perfectly valid and useful to learn C++ even before any other language is learned!

C++ has some really good stuff to ease the newbies!
I will recommend C++ for learning how to program, other languages are more like get your work done, the fastest!

But if you get it wrong in Java or Python, there is (assuming we avoid the bugs in the implementation of the language) a safety-net to catch the user's errors in a way that is normally not available in C or C++.

--
Mats

manav
05-14-2008, 03:59 AM
But if you get it wrong in Java or Python, there is (assuming we avoid the bugs in the implementation of the language) a safety-net to catch the user's errors in a way that is normally not available in C or C++.

--
Mats
How nice to know them from the start! The newbie is not under pressure of making the first release of his software before the last week of the first month! :D

Besides C++ is really easy for newbie like stuff:
Write a program to calculate simple interest:


double prin;
float interest;
int numYears;

cout << "Enter principal amount, interest and number of years: ";
cin >> prin >> interest >> numYears;


The above simple stuff is damn hard to do in Java, and Python also needs a lot of understanding to do this. Even further info will be needed to avoid the invalid input problems!!

matsp
05-14-2008, 04:05 AM
I haven't got Python on this machine, but I thought the Python code to do the same as your C++ example would be about the same number of lines.

--
Mats

manav
05-14-2008, 04:12 AM
C++ version:


#include <iostream>
using namespace std;

int main()
{
cout << "Simple Interest Calculator" << endl;
cout << "Enter Principal amount, interest rate and number of years: ";
double prin;
float rate;
int numYear;
cin >> prin >> rate >> numYear;
double intr = (prin * rate * numYear) / 100.0;
cout << "Interest: " << intr << endl;
return 0;
}


Python version:


print "Simple Interest Calculator"
print "Enter Principal amount, interest rate and number of years: "
prin, rate, numYear = raw_input().split(' ')
prin, rate, numYear = float(prin), float(rate), int(numYear)
intr = (prin * rate * numYear) / 100.0
print "interest:", intr


I loose! :( :confused:

laserlight
05-14-2008, 04:56 AM
Do no discourage people who wish to learn C++.
I have never discouraged anyone from learning C++. I merely recommended that slats concentrate, for now, on the programming languages that he/she already has some knowledge of.


I think it is perfectly valid and useful to learn C++ even before any other language is learned!
With modern C++ pedagogy, yes, I agree (though it would be good to know at least one natural language before attempting to learn C++ ;)).

manav
05-14-2008, 04:59 AM
I have never discouraged anyone from learning C++. I merely recommended that slats concentrate, for now, on the programming languages that he/she already has some knowledge of.
Yeah. I agree!


With modern C++ pedagogy, yes, I agree (though it would be good to know at least one natural language before attempting to learn C++ ;)).
lol! :D you funny! i know that you know what i meant! ;)

zacs7
05-14-2008, 05:55 AM
> The above simple stuff is damn hard to do in Java
What?!? It's really simple actually.


import java.util.Scanner;

class Blah
{
public static void main(String[] args)
{
Scanner stdin = new Scanner(System.in);

double prin = 0.0;
float rate = 0.0f;
int numYear = 0;
double intr = 0.0;

System.out.println("Simple Interest Calculator");
System.out.print("Enter Principal amount, interest rate and number of years: ");

prin = stdin.nextDouble();
rate = stdin.nextFloat();
numYear = stdin.nextInt();

intr = (prin * rate * numYear) / 100.0;
System.our.println("Interest: " + intr);
}

}

Reads like a book. I'm certainly no fan of Java :)

manav
05-14-2008, 06:03 AM
> The above simple stuff is damn hard to do in Java
What?!? It's really simple actually.
I did not know about Scanner :D New addition I guess =_=

No excuse, but arranged by the size of code, smallest to largest:
Python
C++
Java

C++ is behind Python because of 3 lines declaring just variables, plus, 2 braces, can be ignored, i feel, so, C++ code is shorter than Java and no point for guessing, much faster!!!

Mario F.
05-14-2008, 06:50 AM
C++ is behind Python because of 3 lines declaring just variables, plus, 2 braces, can be ignored, i feel, so, C++ code is shorter than Java and no point for guessing, much faster!!!

You are not going there if all there is to reach a conclusion is one example. Ultimately what determines the size of the code and how fast it runs is the programmer skills and to some extent the problem it's trying to solve. I could for instance, resize your C++ example to maybe 5 lines inside of main, but the results could be questionable in terms of code correctness. On the other hand I could add maybe 15 lines outside of main and the result could mean code reuse, or I could even add an entire library with maybe a hundred lines of code and the result would mean I would be in control of float precision.

As for speed, this has been discussed numerous times. My position was always that the speed requirements of an application can almost always be handled by any language (interpreted or not). From the user perspective, they will not perceive any differences in performance or if they do, it will most always be irrelevant to them. This is true for a wide range of applications running in our computers - the gross in fact.

It's when speed requirements are critical, that the choice of programming language may have an impact on performance. And even then, only when the problem domain proves to loose from some choice after testing. For instance, it's quiet common knowledge Java will not handle 2D programming satisfactorily enough to build a modern 2D game or a 2D graphics application without a perceived loss in performance. However, it's quiet acceptable as a choice for the number crushing necessary to run a weather prediction application.

The operative word here is critical. We tend to misplace that word all too often and not fully appreciate that some problems will not benefit from a "faster language".

manav
05-14-2008, 07:13 AM
You are not going there if all there is to reach a conclusion is one example. Ultimately what determines the size of the code and how fast it runs is the programmer skills and to some extent the problem it's trying to solve. I could for instance, resize your C++ example to maybe 5 lines inside of main, but the results could be questionable in terms of code correctness. On the other hand I could add maybe 15 lines outside of main and the result could mean code reuse, or I could even add an entire library with maybe a hundred lines of code and the result would mean I would be in control of float precision.
Well that basically applies to all the languages, Java, C++ or Python!
But newbies need to write small programs to get started! I found C++ version to be smaller, more clear, easy!

I was saying that a newbie programmer is not concerned with the very high level stuff that the languages may do, (s)he just needs to learn some programming tricks, how to dissect a number into digits, etc. just small stuff, getting started.

And also no harm if with these tiny practices the newbie also gets a taste of, type info, variable declaration, etc.


As for speed, this has been discussed numerous times. My position was always that the speed requirements of an application can almost always be handled by any language (interpreted or not). From the user perspective, they will not perceive any differences in performance or if they do, it will most always be irrelevant to them. This is true for a wide range of applications running in our computers - the gross in fact.
Though for some reasons naturally Java is a bit slow, and as you said it does not matter either, just depends on the type of application!
But Java is slow for most inefficient task also, would you like to optimize a file open dialog any further! Nah! Java's file open dialog takes very long time to open, and changing the drive is painfully slow! :( The file dialog is not critical, by any means, and we do not need super fast speed of a compiled language in this case, but, anyway it is so slow, it can turn off the programmer from the start! :(


For instance, it's quiet common knowledge Java will not handle 2D programming satisfactorily enough to build a modern 2D game or a 2D graphics application without a perceived loss in performance. However, it's quiet acceptable as a choice for the number crushing necessary to run a weather prediction application.
While Java's open dialog was painfully slow, 2D graphics were fast! (Faster than what I could do with Qt).


Otherwise what you said, I agree!

mike_g
05-14-2008, 07:17 AM
C++ is behind Python because of 3 lines declaring just variables, plus, 2 braces, can be ignored, i feel, so, C++ code is shorter than Java and no point for guessing, much faster!!!
I really wouldent judge a language on such a limited scope. And for the kind of program that you wrote it really would not make a difference if it was done in C++, java, or Python.

IMO, C++ has a lot more flexibility than the other 2 languages you can also write programs that run very fast with it. The bad points are that it takes longer to learn and theres so many extra ways you cn screw up with it if youre not careful. Java is object orientated and strongly typed, so you are going to end up with a lot of code. Whle Java lacks some of C++'s features it has a huge set of standard libraries that can do almost anything you want, so for bigger projects it can make life much easier and programs I have written in Java generally tend to end up with less bugs. I havent used Python for much so I can't really say that much about it except that its very high level you can generally get away with specifying much less but it comes with speed and flexibility limitations.


It's when speed requirements are critical, that the choice of programming language may have an impact on performance. And even then, only when the problem domain proves to loose from some choice after testing. For instance, it's quiet common knowledge Java will not handle 2D programming satisfactorily enough to build a modern 2D game or a 2D graphics application without a perceived loss in performance. However, it's quiet acceptable as a choice for the number crushing necessary to run a weather prediction application.
You can use SDL with java and many other C/C++ APIs. But yeah, you can make code that runs faster than Java in lower level laguages.

manav
05-14-2008, 07:23 AM
My general view is that C++ is good for starters!
My gut feeling is that it is better for starters!!

matsp
05-14-2008, 07:29 AM
My general view is that C++ is good for starters!
My gut feeling is that it is better for starters!!

But as mike_g says: There are many, many ways that you can screw up in C++ that won't happen in other languages:


int i;
int arr[10];
for(i = 1; i <= 10; i++) arr[i] = i;

Just as one simple, beginner style, example.

--
Mats

manav
05-14-2008, 07:36 AM
But as mike_g says: There are many, many ways that you can screw up in C++ that won't happen in other languages:


int i;
int arr[10];
for(i = 1; i <= 10; i++) arr[i] = i;
Just as one simple, beginner style, example.


That's the point of ignorant learner/teacher, you teach/learn arrays, but did not teach/learn that array start from 0, and end at size-1, if you count in head 0...9 is already 10 elements, so there is no valid index 10, which means there is no 11th element, because you declared a 10 element array!

simple!

and the newbie will respect the fact, from the start, that (s)he has limited resources and should respect bounderies :D

Elysia
05-14-2008, 07:38 AM
But we could argue that example is C.
In C++, you would use a vector and the .at member.
Preferably, also a safe iterator that can throw if you access out-of-bounds.
The standard library is sometimes just as unsafe as the C library.

CornedBee
05-14-2008, 07:41 AM
In C++, you would use a vector and the .at member.
No, you would do that. I wouldn't. Not the at() member, at least.

Elysia
05-14-2008, 07:43 AM
Unfortunately, due to some people who thought it was wise to make it undefined to invoke [] for out-of-bounds, they are forcing us to keep a lot of unsafe code around if we don't want to go around it using things such as .at.
Sometimes I really don't know what they were thinking when they created it. And don't tell me if it was for C compability.
Safe code before unsafe code.

matsp
05-14-2008, 07:44 AM
But we could argue that example is C.
In C++, you would use a vector and the .at member.
Preferably, also a safe iterator that can throw if you access out-of-bounds.
The standard library is sometimes just as unsafe as the C library.

It is VALID, compilable in C and C++ - and don't tell me that you use vector for every single array that you ever need? There are cases when vector is the right solution, there are others where an ordinary array is just fine.

It is very likely, in my mind, that a C++ book doesn't start with STL, but begins by teaching the basic concepts that are part of the basic C++ language first, then introduces C++. In my C++ book ["C++ for programmers" or some such], the first 6-7 chapters are about the basic language, only in chapter 7 (or 8?) does it get onto templates, and only after that does it get into STL.

Maybe I'm also not writing enough user-mode code tho' - I try to avoid code that allocates memory or adds overhead more than necessary.

--
Mats

Elysia
05-14-2008, 07:49 AM
It is VALID, compilable in C and C++ - and don't tell me that you use vector for every single array that you ever need? There are cases when vector is the right solution, there are others where an ordinary array is just fine.
If an "array" is the right solution, then IMHO, there simply isn't a good standard container available. Plain "old arrays" are never the best solution unless you're looking for speed.


It is very likely, in my mind, that a C++ book doesn't start with STL, but begins by teaching the basic concepts that are part of the basic C++ language first, then introduces C++. In my C++ book ["C++ for programmers" or some such], the first 6-7 chapters are about the basic language, only in chapter 7 (or 8?) does it get onto templates, and only after that does it get into STL.
Of course, I wasn't intentionally implying that it would apply to all programs. Beginners typically always begins with C++/C and moves on to more real C++ later. But when they are full fledged programmers, they should be using C++ and not C++/C.


Maybe I'm also not writing enough user-mode code tho' - I try to avoid code that allocates memory or adds overhead more than necessary.
Also this suggests to me that kernel mode really needs to overgo a rehaul. There should be no limit on memory to use and be scared of overhead. That makes code unsafe and that makes the OS crash.
Safe code before unsafe code, as I say.

laserlight
05-14-2008, 07:52 AM
It is VALID, compilable in C and C++ - and don't tell me that you use vector for every single array that you ever need? There are cases when vector is the right solution, there are others where an ordinary array is just fine.

If an "array" is the right solution, then IMHO, there simply isn't a good standard container available. Plain "old arrays" are never the best solution unless you're looking for speed.
std::tr1::array FTW! :)

Elysia
05-14-2008, 07:53 AM
TR1 seems to add a lot of new goodies, doesn't it? :D

DavidP
05-14-2008, 07:57 AM
But we could argue that example is C.
In C++, you would use a vector and the .at member.
Preferably, also a safe iterator that can throw if you access out-of-bounds.
The standard library is sometimes just as unsafe as the C library.


Personally I don't think any of the things you mentioned are what really define it as a C++ program. In fact those things all strike me as a Java-like C++ program. C++ has features such as operator overloading specifically so you can do myvector and not myvector.at(i). When I first learned Java I thought it was ridiculous (and I still think so) that everything used the clunky CompareTo() function.

I also think that the "safety nets" which have been mentioned by various people that Java supplies are needless. How often do most n00bs end up using pointers anyways? When I took my first C++ course in high school, it was an entire year before I really handled a pointer, and by that time I had a solid grasp on the core of the language so when the time came around for me to learn pointers it wasn't a disaster. In terms of other things (such as array-out-of-bounds errors), it provides good learning experiences for people to go through some of those things.

In terms of the speed of Java compared to the speed of C++: the only thing I will say on that subject is that [I]Netbeans is written in Java and that Netbeans is the slowest IDE I have ever seen in my life. Obviously a bad choice of language for that project in my opinion.

matsp
05-14-2008, 08:00 AM
If an "array" is the right solution, then IMHO, there simply isn't a good standard container available. Plain "old arrays" are never the best solution unless you're looking for speed.

Yeah, well, I think we'll just agree to disagree on this one. There are plenty of places where an array is fine.

A very clear example is a constant array - they are known size at compile-time, and just gets very complicated if you have to set it up with vector instead,


Of course, I wasn't intentionally implying that it would apply to all programs. Beginners typically always begins with C++/C and moves on to more real C++ later. But when they are full fledged programmers, they should be using C++ and not C++/C.

But again, the WHOLE language is there to be used - whatever solves the problem in way of:
- correct
- maintainable
- sufficently efficient
should be allowed, don't you think?


Also this suggests to me that kernel mode really needs to overgo a rehaul. There should be no limit on memory to use and be scared of overhead. That makes code unsafe and that makes the OS crash.
Safe code before unsafe code, as I say.
If you wish to rewrite the entire OS, feel free. But it's a pretty huge task.

But there's nothing unsafe about arrays as such - it's only unsafe if you mess up how many elements are actually available in the array - and if you use names constants it can be checked (e.g. using asserts).

Also, as pointed out in other places, STL doesn't work particularly well across module boundaries (EXE->DLL or User->Kernel). So whilst it may be possible to come up with a class that does work across those boundaries, STL will not work - nor any other template libraries, AFAIK.

Have you ever written kernel code?

--
Mats

--
Mats

Elysia
05-14-2008, 08:08 AM
Personally I don't think any of the things you mentioned are what really define it as a C++ program. In fact those things all strike me as a Java-like C++ program. C++ has features such as operator overloading specifically so you can do myvector[i] and not myvector.at(i). When I first learned Java I thought it was ridiculous (and I still think so) that everything used the clunky CompareTo() function.
Absolutely. I can agree no less.
Unfortunately, some members who designed the library thought it fit to make the default index operator unsafe. So they are forcing us to use .at instead if we want a safe program.


I also think that the "safety nets" which have been mentioned by various people that Java supplies are needless. How often do most n00bs end up using pointers anyways? When I took my first C++ course in high school, it was an entire year before I really handled a pointer, and by that time I had a solid grasp on the core of the language so when the time came around for me to learn pointers it wasn't a disaster. In terms of other things (such as array-out-of-bounds errors), it provides good learning experiences for people to go through some of those things.
But, as you understand, just because you think your program is running right, one fine day, your program will crash. If we had a safety net, that would lessen the risk by a lot.
And it will create a safer environment, as well, because buffer overruns are a security risk.


Yeah, well, I think we'll just agree to disagree on this one. There are plenty of places where an array is fine.

A very clear example is a constant array - they are known size at compile-time, and just gets very complicated if you have to set it up with vector instead,
The problem about vector is unable to initialize it well (but that should be solved in C++0x). Otherwise, even if constant, I would still think it's better with some kind of container, as a safety net or as to provide more functionality to arrays.
If used correctly, it can make the code more reusable, as well.


But again, the WHOLE language is there to be used - whatever solves the problem in way of:
- correct
- maintainable
- sufficently efficient
- sufficiently secure
should be allowed, don't you think?
I'd like to add another category, though.
Constant, non-container arrays fails the red line :)


If you wish to rewrite the entire OS, feel free. But it's a pretty huge task.
Yes, I'm sure this is why the current state of the kernel is as it is. To some extent, anyway.
It's a shame.


Have you ever written kernel code?
No, I'm afraid not. I'm used to user mode where there's plenty of memory and protection available.

Also note that I wouldn't recommend just std::vector. Obviously, and safe container is a viable choice in this matter. Std::vector is just one of many containers.

matsp
05-14-2008, 08:25 AM
But, as you understand, just because you think your program is running right, one fine day, your program will crash. If we had a safety net, that would lessen the risk by a lot.
And it will create a safer environment, as well, because buffer overruns are a security risk.

Can I just point out that there are other ways to create a safety-net than to use C++?

--
Mats

Elysia
05-14-2008, 08:25 AM
Sure, the argument was for a safety-net within C++, should you use it.

abachler
05-14-2008, 08:29 AM
Absolutely. I can agree no less.
Unfortunately, some members who designed the library thought it fit to make the default index operator unsafe. So they are forcing us to use .at instead if we want a safe program.

Only if by safe you mean 'I can be a bloody retard and not stay aware of what Im doing in my application'. So you lose track of the size of your arrays and index into a 'safe' array, which instead of crashing and letting you know you wrote sloppy code, proceeds to act like nothings wrong until 6 months after deployment your customers want to know why their databases are trashed and grew 5000%.

Elysia
05-14-2008, 08:30 AM
That's an entirely different issue.

Mario F.
05-14-2008, 09:04 AM
Well that basically applies to all the languages, Java, C++ or Python!
But newbies need to write small programs to get started! I found C++ version to be smaller, more clear, easy!

Every language allows you to "write small programs to get started". C++ is not smaller than any other language on that respect. You agree then code can be extended or simplified to some extent in all languages. So you can agree the size of the code is not a good measure of how easy the programming language is to learn.

The next one was performance. However performance is not in the mind of the apprentice when evaluating how easy a certain language is to learn or how easy it is to be taught.

Ultimately no language is easier to learn than some other language. This is probably most true for at least the mainstream languages; after all there's the fact they are indeed mainstream. You can hear a crowd of Java programmers swearing over how easy that programming language is, the same from Ruby, C, etc...

Every language presents the newcomer with its own set of challenges and simplifications. What can be asked instead is if some language is easy to learn or can be made easier to learn. I'd say there is a common knowledge around C++ that the language certainly can be improved towards minimizing the learning curve, which if it doesn't contrast with the idea C++ is an easy programming language to learn, at least provides a good case against it in court.

What is more important instead is that learning a programming language is a personal process that is dependent on many factors, some of them external and out of one's control. At the lowest level our own motivation, background, age and computer literacy can determine how easy a language is to learn. But invariably the method and quality of the teaching will have the strongest impact. Two different people can have completely opposite feelings about how easy C++ is to learn and possibly they are both right.

Finally, the same programming language can provide the apprentice with rather easy to acquire concepts and concepts that take a lifetime to master. C++ is no stranger to this since if at one hand you have procedural programming that is a rather easy to understand concept, somewhere along the line you'll meet object oriented programming which will take a good chunk of a programmer's life to master and generic programming which, despite being the most sexy thing, shouldn't ever been invented.

In fact, even at the lowest levels one can meet these apparent idiosyncrasies in the learning process. When learning C++, arrays, pointers and references all can be somewhat easy to acquire. But many, me included, stumble and fall flat on their faces once the keyword const is introduced in their context.

So to conclude... I dare you to prove some language is easier to learn than the next one :)

CornedBee
05-14-2008, 09:57 AM
Most people I know who tried to learn Java (most of them after PHP) had a somewhat hard time grasping the reference semantics of the variables. (PHP 4 didn't use reference semantics.)

The language isn't without its traps.

michaelp
05-14-2008, 05:38 PM
I didn't read through this whole thread, so I'm not sure if someone has said this, but isn't starting with C to move onto C++ not really a good thing because you will end up learning "C-Style" C++ with the casting, scoping, etc. Although, if you read the book by Bruce Eckel, "C, Foundations for C++ and Java", you might be okay.

Elysia
05-14-2008, 05:40 PM
I do agree that if you're going to learn C++, then you should learn C++ and not C before.
Typically C++ classes introduce you to some C++/C, but not as much as you'd use in pure C.

Mario F.
05-14-2008, 05:44 PM
There's also the argument that C++ is one programming language and C is another distinct programming language. Learning C++ by first learning C means learning two distinct programming languages. A waste of energy if one only wants to learn one of them.

manav
05-14-2008, 10:42 PM
... So you can agree the size of the code is not a good measure of how easy the programming language is to learn...
Sometimes if you write less code, that means you did fewer things, that means you had to know fewer things, that means you learned it quicker, that simply means it was easier! So yes, sometimes lesser code shows that the particular language is easy!


Ultimately no language is easier to learn than some other language. This is probably most true for at least the mainstream languages; after all there's the fact they are indeed mainstream. You can hear a crowd of Java programmers swearing over how easy that programming language is, the same from Ruby, C, etc...
Easier in the sense?
If we think about being easier means fewer things to know, fewer to worry etc. then yeah there are some languages which are easier than other.


Every language presents the newcomer with its own set of challenges and simplifications.
That happens because the new comer is, well, a new comer, I know people who find it really hard to understand HTML! :(


What is more important instead is that learning a programming language is a personal process that is dependent on many factors, some of them external and out of one's control. At the lowest level our own motivation, background, age and computer literacy can determine how easy a language is to learn. But invariably the method and quality of the teaching will have the strongest impact. Two different people can have completely opposite feelings about how easy C++ is to learn and possibly they are both right.
You know, as I get more experience in this field, I feel that programing language choice is the least of a concern, even for a programmer/developer!


So to conclude... I dare you to prove some language is easier to learn than the next one :)
That will fall flat! Since I am on a C++ board! :D

But arranged by the easiness, most to least:
Python, Java, C++

whiteflags
05-15-2008, 01:30 AM
Sometimes if you write less code, that means you did fewer things, that means you had to know fewer things, that means you learned it quicker, that simply means it was easier! So yes, sometimes lesser code shows that the particular language is easy!

You can do a lot of functional programming just by outlining cases, but I wouldn't call that simple work.



But arranged by the easiness, most to least:
Python, Java, C++


Let me repeat that I only suggested he stay with what he's learning because I'm not sure how much is "the beginnings of python" or how much Java he really knows. I'd rather him build good things in languages he knows rather than ask him to relearn the C++ way, right now, because that's where he's posting at. It had nothing do with the easy way versus the hard way, whatever that is supposed to mean.