10

Possible Duplicate:
Which Programming Language Should I Learn?

So I recently just finished a year of Java in my Computer Science class, and want to further pursue programming. I was not much thrilled about Java, I liked the OOP part but disliked its execution speed.

I was thinking C++ but I keep hearing people complain (?) about templates and new C++0x (someone might need to elaborate that to me). A friend of mine recently bought me a Python 2.6 book, but I haven't started on it since I hear Python 3 is going to be released soon and is not going to be backwards compatible. I tried C# and it was nearly identical to Java but I found it to be Operating System specific although I hear people are running it on linux and osx through Mono.

Leading to all this is my question. I want to learn a solid programming language that is not too hard to pick up and is rather fast and multi-platform, so which one should it be? (Does not have to be any I listed)

Thanks for replying!

41

Here's the question. What do you want to DO with it? That's what determines what language you should learn:

If you want to:

  • Write enterprise applications on the MS platform -> C#
  • Turn text files into other text files in a few lines of code which only the 1337 will be able to r3@|} -> Perl
  • Write websites quickly on the MySQL/Linux/Mac platform -> Ruby on Rails
  • Very high speed integrated circuit design -> VHDL
  • Write device drivers and interact with older Windows-based code -> C++
  • Drool all over yourself in a fit of cretinism -> Visual Basic
  • Write your own OS/device drivers/really GROK how programs are written -> C
  • Learn how your CPU works -> Assembler
  • Learn the basics of computers at a low level -> 6800/6500 Assembler
26 accepted

Wow, you've sure found a lot of reasons to not learn new languages.

  • In C++, you don't have to use templates or any new C++0x features if you don't want to.
  • Python 2.6 is great and will be around for a long time, Python 3 notwithstanding. Besides, the upcoming changes aren't major.
  • C# is very close to java in some respects, and has a reasonably strong cross-platform community.

All of the above would be good choices to learn. The more you know, the better programmer you'll be. If you're interested in branching out, have a look at Ruby, Haskell, or Clojure.

15

Learn Haskell, Scheme, Erlang or Lisp. Learn a language to make you think, and bend your noodle a little. You have a marketable one, now learn one to learn some programming.

11

Python is cool and awesome but I think you should have a solid foundation in C, C++, and assembly before you jump into python, because it hides many things from you, and if you're into computer science, then you cannot afford to not know the low level details

5

I would like to sincerely say Thank You to everyone who answered and/or commented, I've decided to pick up C since a majority of you recommended it. Thanks!

4

I would choose either a procedural language (C) or a dynamic language (Ruby would be my choice). These will both give you a different perspective than Java, though for different reasons. I guess I'm old enough to believe that everyone should learn to program in C. You ought to have to know how to manage your own memory, use pointers, and get as close to the metal as a high-level programming language allows you. Dynamic languages seem to be coming into their own. TDD has provided a blanket of security that compensates for the omission of type safety and that seems to have sparked the dynamic language community. Either of these would be excellent choices, I think.

4

In order to not fall into the trap of being a "Java school" programmer (heavy on the architecture, short on the fundamentals and algorithms), you should learn

  1. C (and take a systems course while you're at it ... nothing like disassembling a "bomb" to learn about the low-level stuff)... Assembly

  2. A functional language (Haskell/Lisp/Scheme) or multi-paradigm language with 1st-class functions (Python/Ruby)

I personally use C# for all my daily coding, but it's solidly in the Java camp of languages, so it won't help you diversify your skills as much.

3

Learn C. With C and Java experience, you will have no trouble finding a job anywhere. You can use C as a stepping stone to lower level development if you choose, or find out that it is the exact opposite of what you are looking for in a general programming language. But with C and Java you will easily be able to learn any other general purpose programming language out there very easily.

2

The differences between Python 2.6 and Python 3 aren't really substantial from a programmer's perspective, unless you must port tons of old code. (The main difference is that in Python 3 all strings are Unicode.) Don't worry about losing backward compatibility: Learn Python and stay assured you will be proficient in few hours when version 3 comes.

Here is the list of changes, anyway.


EDIT: read also this question.

1

"a solid programming language that is not too hard to pick up and is rather fast and multi-platform"?

That sounds exactly like Java to me. If you want speed, go with C++. My personal opinion though is that speed matters for less and less projects so Ruby would be a very good choice. Ruby is IMHO one of languages that everybody should learn.

Also remember that the next language will be just the next language. When you continue your career you will need to learn many more.

1

I would recommend a Dynamic Language like Python, JavaScript, Ruby or Lua. Some of these use Prototype based Object Orientation which is nice to know. I like Lua, it's written in pure ANSI C (so any device/OS that has an ANSI C compiler can run it) and it's pretty fast and uses prototype based Object Orientation.

1

You can study the landscape, the future, the strategic directions and still be completely surprised by a language that explodes on the scene and grabs everyone's imagination.

Rather than try to foresee the future direction of the industry, just jump in. Learning a new language is always beneficial, even if you never use for production work.

The number of languages you'll learn will -- eventually -- be quite large. Look at Programming Languages I've Learned. I'd say that it has to be a new language every two years for the rest of your career. Start now.

1

You don't like Java's execution speed so you are thinking about learning Python?

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all

0

I'd recommend Python. Both do well on multiple platforms, and Python has a few tools like Psyco and Shedskin that can increase speed dramatically. Python's also very closely coupled with C, which can provide a huge speed boost for bottlenecks and another avenue of exploration.

Another major bonus is that after Java, Python's syntax should be very easy to grasp, getting you up to speed faster.

Finally, there's a huge opportunity for Python/Java synergy, since Python is a very fast language to develop in, it can provide an excellent opportunity for developing prototypes for later coding in Java or C.

0

If you like OO and hated Java's exec speed, you'll love Delphi.

I went for a Java job interview, they introduced me Delphi, I'm stucked to it since then =)

http://www.codegear.com/products/delphi/win32

0

Erlang if you want to learn a functional programming language, which is multi-core concurrency ready --- arguably the next big thing.

Ruby if you want to play with Ruby on Rails, one of the best web application framework.

0

Learn Rebol. Though you won't find a job asking for Rebol's skill it will greatly enhance your programming concepts understanding as well as using Rebol as Leighweight Code Generators for more Traditional Languages. See http://reboltutorial.com

0

If you want to learn a language to get a job I suggest you do a search for jobs in your area. Find which jobs you might like to do and which skills you need to get those jobs. I suggest you demonstrate an interest in those areas.

Above all don't expect to be an expert overnight, it takes perhaps ten years work experience to be a vocational expert in a language.

-2

hey! u i m not at all interested in learning c and java rite now as it will be in my course later. can u plz tell me which is the best language to start wid and can be easily done in 2 month.