At the risk of start another war... Anyone care to discuss the advantages of their favorite programming language(s)? I haven't yet learned a language, but I am thinking of taking a programming course. The only language offered at my school is Java. I am thinking that once I learn the basics of a language, I will be able to get started in another fairly quickly; is this the case? Is it a smooth transition from Java to C or C++?
I use C exclusively (except when scripting). I find its clarity and direct connection to the hardware (and complete lack of OOP!) wonderful. It makes it a bad thing to start with, though.
If you want to learn to program, may I recommend Microsoft QuickBasic? It was made before the time Microsoft became evil... before... the dark time... before... the empire. BASIC is rediculously easy to learn, after all.
It's a good idea to learn Java, but beware, it's not necessarily very easy, and it's not exactly a smooth transition to C or C++. What makes it a bit smooth is that Java and C use almost exactly the same basic syntax. However, while Java is completely and ultimately hardware independent, C and C++ really aren't. In C++ you _can_ get away from the hardware using some fancy classes, but in C, doom is inevitable if you don't know how a computer actually works. It's far easier to go from C/C++ to Java than the opposite.
Search the net for tutorials and stuff; there are probably more than the total number of programmers world-wide. If you go with BASIC, check out http://www.qbasic.com/. That page hasn't been updated since 1999, but it still holds interesting stuff if you want to learn.
Choosing a favorite language would be like choosing a favorite composer. I have many of them and I find it hard to pick one out of so many.
Getting back to the real topic, an easy language to learn would be BASIC. That was the first language I learned and I got a C in the class. The only reason why I got that grade was because I slacked off and headed to the bars every night during college. I then proceeded to C++ but C was more focused in my school. During my senior year, I really learned that C was a great language. After graduation, I read again my C++(along with new books I bought) and learned the language to its full potential. Dolda might disagree with me here but I think OOP is a great contribution to the programming method. I also found it easy to learn Java after learning classes in C++. C++ is more manual than Java. It's like a stick shift vs an automatic. I must say that Java is less error prone and of course it is platform independent. Even though I love C based languages so much, I find that LISP is something that I really would like to master. When I learned Scheme(a variation of LISP), I had a very hard time adjusting to it. In LISP, you write the rules of the problem. In C, you write how to counter act a problem. It's a different approach. Give it a look if you ever have the urge to learn AI.
I have goofed around with BASIC and Apple BASIC, but never very seriously. I thought it interesting that you said learning JAVA would be a good idea. I like the idea of writing code once and running it anywhere, but it bothers me to have to depend on someone to write a virtual machine or interpreter for my code to run on; I guess if was coding in C, I would be dependent on the people who wrote the compiler! Oh well...
Although, I think I read on Slashdot that Sun has made the JVM open source, which is great in my opinion.
LISP sounds interesting, although it doesn't sound like it is a commonly used language. I don't mean that it is weird or off the wall, but I don't think you would use it if you had a job in an office building somewhere.
I suppose you could use it for some sort of a routing program...
Well, LISP or Prolog(another AI programming language) is really used more in the research area as far as I'm concerned. However, emacs was written entirely on LISP so you can see the amount of potential that the language contains. With that being said, LISP is not the ideal language used in the business world today. I'd say Java is most dominant than it'll probably be C++. C/C++ is more used in the gaming industry. I feel that certain programming languages are better for certain types of jobs. I just hope that people realized this and don't write every single program in Java or PERL or some other langauge that they favor.
Hello, again, I know it's been a while since I've been on (Problems with my computer, and lack of time)
Anyway, I feel OOP has been a great advent to the programming industry. It allows for better code writing, and ease of deciphering. Java has this inherently built in, whereas C++ has it make-shifted in (being built atop a structured language and all). I learned Java before I learned C and C++, and this is one of the few time Dolda and I agree (as far as Java/C++ is concerned) that learing C/C++ first is an easier transition than learning Java first.
As far as LISP goes, you can keep it!!!! Yet, it does have it's place in the industry, it's just not for me!!! Man, did I hate that class!!! Maybe it was just the teacher.
That all being said, I prefer Java (besides being open-source, it's documentation is excellent). And, bpark is right in that every language has it's place. If you need something to run fast (Real-Time System), C/C++ would be better. If you need something that is platform independent, Java might be suited better. If you need something to run fast, and need someone to decipher the code for you, LISP is your choice 8-).
Yes, Java is harder to learn than C/C++. I found that knowing C++ was an advantage to learning Java but I didn't know classes very well so I don't know if I can totally agree with what I just stated. Once learning Java and it's classes, I learned classes in C++. It wasn't really a hard concept. However, I wouldn't recommend that a person who hasn't any knowledge on programming take on OOP head on.
OOP is a great programming technique. But again, there are times where it'll fit and times there where it won't. Take for example system programming. Now while you can do it in C++ and make classes, I prefer to use the direct approach of procedural programming since I find no need for classes. However, it might be wiser to use classes to take advantage of principle of least privilege. I must say, code looks easier and neater using classes but it's really just a wrapper. Another place where I wouldn't use it is for openGl. I don't see the benefit of creating classes here since fast execution is key.
As for LISP, I forget if I mentioned this story or not but my professor failed 80% of the class. We took Scheme(a dialect of LISP) but nontheless, he made it ridiculously hard and I too really hated that class. The reason why I like this language is that it's different from other languages in the sense that everything is done with logic. Remember, LISP stands for Lots of Irritating Single Parenthesis. =)
Oh, my, it was a while since tithefug was around.
Now that you're here, though, would you mind explaining to me just how OOP has been good for the gaming industry?! (No, we never disagree about OOP, why?) I can understand its place in the VMs of different game engines, but why anyone would build the engine in an object oriented language is far beyond me. But really, I fail to see it any other way than that OOP is almost only good for making programming languages easier to understand. Once or twice it might save you a couple of lines of typing, and it might make the namespace a bit cleaner, but it's just not worth it! Yes, I'm even more radical than normally, but you know, every time I see two Os and one P in the right sequence, something inside me just catches fire... :evil:
Now the advantages of Java is of course that it's so widespread, and that it's platform independent. But really, let's face it, it didn't have to be object oriented.
I must say that I like LISP, though. I haven't taken a class for it (actually, I've never been to college/university (or whatever it is that you call it in the U.S.) at all, but that's another thing), and I really don't know it that well, but I can't stop liking the fact that it basically has only two syntactical elements, and that is just so elegant.
It looks like we are stumbling upon this topic once more. About OOP and gaming, I actually see a lot of that in gaming job descriptions. I would have to agree with you and state that procedural or structured programming might be a better approach but the only reason that I can think of using OOP is because it's more readable. When other people need to edit the source, I think they'll prefer OOP.
Now, I know that you despise OOP but there are a lot of more people that love it(I wonder, can we do a poll on this topic about OOP?). As for Java, yes, it could have left out OOP or it could have been more like C++. However, the people the developers at Sun probably saw OOP as the new programming style and didn't want to leave it out. Furthermore, they probably think it's easier to read and write as opposed to the traditional methods of writing code. Again, everyone has their own opinion but I think there are times where it's appropriate and times where it's not.