Programming – How to Be Language-Agnostic

language-agnostic

By now I work with asp.net and C#. I have done a decent work in Java as well. I am planning my career in such a way I should be language-agnostic someday. What are the things that I need to learn?

First would OOP paradigms as its speaks about the Class design. Are there any others?

Best Answer

To be language agnostic you need to have experience in all of the common styles and types of languages.

  • An imperative language (You tell it what to do, step by step. Eg - C)
  • A declarative language (You tell it your goal, it figures out what to do. Eg - SQL/HTML/Prolog)

Also:

  • A functional language (Functions are key, avoiding state and side effects are the goals. Eg - Haskell/OCaml/Lisp/F#)
  • An object oriented language (Architecture where objects encapsulate related data and the methods that act on them). Eg - Java/C#)

Some typing styles:

  • A statically typed language (Data types are defined and checked at compile time. Eg - C#)
  • A dynamically typed language (Data types are checked at runtime. Eg - Python/Javascript)
    Experience of strong vs. weak typing is also useful.

Some different runtime styles:

Lower level stuff:

  • Something fairly low level (Eg - C)
  • Some dialect of assembly (Eg - NASM)

On top of that I would say you need experience of some concurrent programming and something event driven. You should probably also make sure you know something about the various domains such as web programming (client & server), rich client development/desktop, games. You might also want to learn about embedded programming, or dedicated hardware (like games consoles), and mobile development is becoming an increasingly relevant domain.

Others have also mentioned that it's worth getting some experience of Generic programming and Meta programming approaches.

When you learn these paradigms avoid just learning the syntax and writing in your old style. I've seen many C# devs write JavaScript as if it's statically typed. Don't do this, try to learn the language paradigms and embrace them.

If you've done all of this, the differences between languages will become largely syntactical so switching will become a fairly simple exercise of learning some new syntax.

Don't forget though that modern programming is almost always dependant on a framework, so familiarising yourself with the common and popular frameworks for each language you learn is also critical. Knowing C# is irrelevant without .net.

Related Topic