tags:

views:

780

answers:

6

I have been reading about the need to learn multiple programming languages and have become quite convinced that it is important to understand multiple languages.

Once a developer becomes familiar with one language, it is easier to learn another language by mapping common concepts and differences.

I have tried to list some generic questions which might help in mapping programming concepts to the way they are implemented in the language.

Are there any more questions which can be asked for a programming language?

I think if we can answer these questions for a language, it will give a good grasp of it's strengths, weaknesses, and how to work with it.

  1. What constructs does the language offer for modularity (namespaces, objects, functions, modules)?

  2. What are the first class citizens (types... including primitives) of this language?

  3. What type of access control features does the language offer?

  4. What kind of abstraction, and encapsulation does this language offer?

  5. What constructs does this language offer for managing program flow?

  6. How does one interact with files in this language?

  7. How does one hold object (collections)?

  8. How do we manage exceptional conditions?

  9. Does the language have any in-built security features?

  10. What concurrency model does the language support?

  11. How does this language manage cleanup of resources and memory?

  12. What are the important API classes in this language?

  13. What are the main features of the languages runtime?

  14. Does the language offer meta-programming support?

  15. Are there any features unique to this language?

I came up with this list of questions which I am hoping will help me learn other languages from my base of Java development.

Is making such a list a good approach to learning another language?

Can we add more questions?

Is it possible to create a list of such questions, which will be sufficient to approach any language, or will the list always fall short for at least some languages?

+10  A: 

You should learn new programming languages because they'll vary in ways that aren't on this list.

This sounds like a sarcastic answer, but it's not. Languages vary in all sorts of crazy ways, and you generally won't even know what questions to ask until you learn a given language.

For example, here's a few more questions you could ask:

  1. How does the language handle embedded database queries, and how does it generalize those features to other kinds of queries? (Try learning C# and LINQ.)
  2. How does the language allow you to solve constraint-based problems? (Try Mozart.)
  3. How do you implement efficient data structures using only non-destructive operations? (Try Haskell.)
  4. Is duck-typing really useful for large projects? (Try Ruby.)
  5. Are there some problems which do require static typing, if only because no human could ever get the code right without it? (Try reading almost any of the advanced Haskell bloggers.)

Essentially, every truly worthwhile language should add another question to your list.

emk
Agreed 100%. "Why learn this?", or "What are its greatest strengths?" are the most important questions I can ask about a new language.
JoshJordan
Good answer, I would say. You can't properly compare a number of languages in such a rigid way. Get to know a few languages and choose the most appropiate for a certain project (sometimes one stands out, other times any might do).
Noldorin
+3  A: 

I suggest you break out of your shell completely and learn Prolog. That'll blow your list completely out of the water.

Cruachan
+1  A: 

Different languages introduce different aspects to the art of programming (eg in Javasript you can pass functions as arguments). Like you, I too come from a base of Java as my first language, but when i started picking up other languages I just dove head first. While making a list of differences can be good as a start, I have found that no list will prepare you for a second language. I recomend that you explore what it is that you wish to do and then find a language that seems suited for it. While many languages can relate on some level, every language requires a different approach. Probably my best recomendation is to make your second language an OO one like C# or Python. That way you will not be challenged to the point that you simply give up.

P.S. I will clean up this answer when i get to a real computer.

Mike
+3  A: 

"Is making such a list a good approach to learning another language? "

No.

Using languages is.

There is no substitute for actually getting busy with a language and building something that solves a problem. Even if you have to invent the problem yourself (and it's a problem that has already been solved) at least working with the language on a small project will be beneficial.

Chris Holmes
+2  A: 

Because people have different learning styles (hearing, seeing, touching/doing), simply answering a list of questions/qualities may not be enough for an individual to 'learn' or 'understand' a language.

Also, there are different language types - consider C vs prolog or Lisp (see Seb's post); IMO it really is better to learn them via experience rather than to read about them, just because they are so vastly different.

As a programmer, it is a joy to work with a new language and discover it is "better" in some area than a language you already know. Broaden your horizons, go experience other languages, as Cruachan suggested.

If you truly loathe learning new programming languages, you might want to step back and think about if programming is really the right career for you.

rlb.usa