Now if I had to pick three languages, they would probably be something along the lines of:
1. C. This language has been relevant for 40 years, and will remain relevant for at least another 40 years. Low level understanding of computer operation is paramount for a lot of advanced tasks.
2. Python/Ruby/Lua. A dynamic "scripting" language is very useful to get stuff done quickly when you need it.
3. A functional language: Haskell, ML or Lisp. Knowledge of this paradigm will make you a better programmer, regardless whether or not you get to use it in your day job.
There are languages I'd like to add to this list, namely something like Java/C# (a "managed" imperative language). And then some "brain teaser" languages to expand your horizons, Prolog is a good one for a rainy weekend and doing some simple Brainfuck programming because Brainfuck is to Turing machines what Lisp is to Lambda calculus.
But I disagree with the "3 languages" rule here, I'd recommend trying to learn a little bit of a new language every year. Next on my list is Rust.
Absolutletly agree. By the way, an interesting language to learn is Smalltalk.
For instance, he was very right about the goto abuse but the idea of removing a powerful tool from your belt just because can be abused is a bit too much. Here I suspect is happening the same, he was concerned about people learning a lot of languages but not mastering a single one, still that doesn't negate the advantages of master one language and learning more.
Python - Python is by far the best 'glue' language out there. There are things Python isn't good for, bit it's far far easier to replace the performance critical bits of a python impl with a faster module, than the other way round
C - Gives you a good understanding of what the actual impact of each line of code has. Unlike ASM, it's still fairly approachable, and useful at scale. Unlike Java, you retain a good feeling of the instruction-level impact of each statement you make
JS/DOM - HTML + Javascript is the future of user interfaces (for the next 5-10 years anyway). QT/GTK/Win32/IOS/Swift all have their places, but for a dev speed / cost-benefit payoff point of view, just do it in HTML. A deeper understanding of the DOM API will allow you to make better choices that mean you don't end up with a sluggish, unusable interface
This is, of course, only based off of what I know so far and what I would find most useful. I could probably trade JS for a SQL, though, if I was thinking purely in terms of work that I'm into now. I don't use C at all, except to look at Python bindings occasionally...but all the concepts I've learned from learning C are vital, even when working with high-level languages. Plus, it'd be nice to switch to iOS development at some point.
1. Javascript
2. C
3. Python
1. Good Scala - FPish Scala, coupled with Scala libraries such as Spark, mllib, scalaz, Scalding, Apache Math, colt, akka.
2. Bad Scala - Using Scala much more as an imperative lang, primarily for 3 purposes - shell scripting, web front-end html5 graphics and DOM manipulation with scalajs and web back-end with scalatra.
3. R - This one is not going anywhere in a million years thanks to Hadley Wickam and co. Now with SparkR I get to use #1 and #2 with #3.
My one desire is that Styla becomes a first class citizen in this ecosystem as well - when you need prolog, there is often no easy substitute.
Scala covers mainstream OO-programming and Haskell-style modern functional programming (monads, higher-kinded types). Moreover via Akka you have access to Erlang-style distributed programming.
C is vital for low-level programming like operating sytems and network stacks. C might be replaced eventually by Rust but if that happens at all, it will take at a decade or so.
Javascript is without competition for anything in the browser.
All three languages have vast library and tool ecosystems at their disposal.
Otherwise, it depends on what your main task is; possibilities: front end web, Anroid, iOS, back end web services, data science, etc.
In general, you need a scripting language. I prefer Ruby, but if you need to do data science, machine learning, etc., choose Python. A scripting language may suffice for web development also.
I am a proponent of learning Java. The Java ecosystem is huge and there is a lot of good stuff.
Choose an esoteric language. I personally like Haskell, Smalltalk and Lisp languages.
Tie between Elixir (because scripting language that runs on Erlang BEAM), and Javascript (because it is so ubiquitous, despite having so many bad parts - though it has a fair share of good parts too).
Java - Because it is the modern COBOL...everyone hates it, but there are so many systems and shops that use Java that it becomes a de factor requirement to learn it.
Close runners up are:
* Clojure - Because it is based on Scheme, which is based on Lisp, and takes the functional approach. * Python - Because the philosophy and syntax are beautiful * Ruby - Because it is really fast to get web server stuff done
2) JavaScript, because if learning one language, such as C, is important, so is learning a language on the other end of the spectrum. And in some important ways JavaScript stands opposite C. Learning both forces the programmer to understand managed vs. unmanaged, working with and without a compiler, strict vs. dynamic typing, deploying a binary vs. a web app, etc. Those are all opposites programmers should gain experience with at some point.
Plus, JavaScript's ecosystem is just too rich too ignore.
3) SQL, b/c working with databases and relational data has always been important, and that won't change.
With clojure/JVM, you get a Lisp as well as good knowledge of java interop / apis, so you'll be able to work in Java if you have to, plus you get all the java libs, and there's basically a java lib for anything you could ever want to do.
Then I'd make sure you know JavaScript, its gotten to be a good enough general purpose scripting language, plus you'll be able to do anything you want browser side with it.
As your third I'd pick C since basically every other modern language / OS / low level lib is built on top of it. But it depends on how much you want/need to go down to that level. If you're just going to be doing web/mobile service development I might say go with something like Go, since it'll be more practical there.
2) Elixir. Distributed systems, embedded software (IoT networks), critical/reliable web services and backends.
3 some systems level language (either Rust or C, Go is too laughable as a language for me and google stuff in general isn't something I can recommend any longer)
I don't know if one can be fluent only in 3 languages, but I'm in the rank of those who say that learn more will not harm you.
You can reason a lot about, but when you've to learn a new language, just for the pleasure of learning and because it will make you a better programmer, one thing counts: instinct.
I'm often inspired by a blog post, a snippet of code or simply a tweet that sings the praises of something! I don't make forecasts for the future of a language, if it looks cool to me, I try play with it and see what's going on. (I think you can found practically any REPL on my laptop...)
Anyway I'll give my list of 3:
C# - Because I work with it from beta. F# - Because I can use .NET knowledge with a functional-first language (and it helps me open the path to other functional langs). Ruby - Because I'm still a fan of RoR and I love its KISS approach (and a smart dynamic language is useful for various tasks, e.g.: related to DBMS).
Others:
Erlang - It makes distributed computing "easy". I love vanilla Erlang, but other langs of its ecosystem are promising: LFE and Elixir, for example. Haskell - Knowing it will make you better in every language. Go - Because it's fun to work with it. OCaml - Because I love ML syntax and I'm interested in all ML-family langs. ELM - Because I prefer delegate to a transpiler the duty to write javascript. PureScript - Same as ELM.
C - For interfacing with existing systems (POSIX, OpenCL, OpenGL etc) which would be too much effort to reproduce.
I struggle to think of a third which I'd absolutely need (other than assembly), so I'll opt for VHDL - for when we need to break free of the shackles of our CPU.
Python: proof-of-concept, web-dev backend, scientific exploration
C: performance (low-latency), system (interface to most kernels), game-dev
JavaScript: UIs
Remark that I would not consider these languages my personal favourites, but in fact, you do not have much choice. C is enforced as it is tight to *nix which is the most spread OS, JavaScript as it allows you to build cross-platform UI's (that do not require user-installation) and Python because of its huge library diversity (in particular in the applied sciences).
If you speak them sufficient you can tackle most problems. If you then want to go further I suggest
Haskell: expressive, performance (through-put), reliability
Scheme (e.g. Chicken): expressive, simplicity, explorative computing
Additionally one might consider Java (and later Clojure, which should be easier if you already know Scheme and Java) to interface with the JVM world.
That said, whilst programming languages are fun to learn and tinker with, I find a lot of people give them too high a priority (hence you hear stuff like "now that Swift is open-sourced and available on Linux, iOS developers will be able to easily write Android apps"). Compared to UI frameworks like Cocoa, etc, a programming language is very quick and easy to learn.
Ruby makes for a pretty slow server side language. It's appropriate when moving fast, but at scale it's rather icky. Your other languages seem to fill anything it can do.
Have you considered Go, Java, Scala, C#, etc.? None of these are "low level".
Disagree though about Ruby being icky at scale. Whilst some companies have moved away from it as they have gotten bigger, there are tonnes of companies that are still using it successfully.
I also disagree that the other languages cover Ruby's uses. It is an incredibly flexible and powerful language and has an incredible assortment of very well written and very well maintained libraries - far exceeding any other language I've used. Plus, having used many other web frameworks, I'm afraid nothing is as good as Rails. Some, such as Django, come close - but nothing quite beats it.
That said, it all depends on your use cases. I'm mainly a web programmer, building web apps, APIs and the occasional mobile app. I'm not dismissing other languages by any means, but these are the languages that I would personally keep if I had to throw away my knowledge of all programming languages but three.
LISP/Scala/Clojure/Erlang/Haskell/Prolog
Python/Perl/PHP/Ruby
Java/Javascript/C/C++/Go
For extra credits one from:
FORTH/Smalltalk
That should get you enough of a grip to pick up the remainder easily and when needed.
Currently I'm fluent with Ruby, Haskell and JS.
Both Haskell and Clojure are compiling to JS nowadays. I dont want to be "fluent" in JS for that reason, just know enough to debug the occasional problem.
2. Javascript - Both a scripting language and the Web language. If it weren't the lingua franca of the browser I would much rather choose Python or Ruby instead.
3. Java - A typesafe, managed JVM language perfect for writing microservices, Android apps, etc. For anything bigger than would be appropriate for a scripting language or that must be maintained by several people. Java hits the sweet spot.
For lower level stuff and performance, definitely C++ and then eventually if you need it C as well, but I think it doesn't make much sense the other way round.
And as already said in this thread, it's good to pick up a functional language, just to broaden your horizon if nothing else.
I'm almost kind of serious. I had Ada in there, but C++ is building okay concurrency support, and is otherwise better at interfacing to other things. Maybe pull Fortran in favor of Ada? That's a thought. Not sure there are enough libraries in Ada.
Why these? Because you can build serious stuff. After awhile it gets boring writing yet another regular expression to parse yet another 'text file as database' blob thingy. I don't want to glue, I want to make what others glue together.
I can simulate rocket flight, planet formation, ocean temperatures, and predict the weather. I can write neural networks, do computer vision, deep learning. I can implement any type of database, implement Google search. I can write my own OS. I can hack a lot of this stuff together with Matlab, and then make it scream in C++ or Fortran.
Yes, C++, not C. I can write faster code in C++ (e.g. qsort vs std::sort), I can interface with both C and C++ libraries, and if I know C++ a pretty much know C by default. You can get to bare metal, or be more abstract. Why limit myself to learning C? Makes no sense. A lot of my C++ code looks like C, other times I use a lot of template magic. Depends on the needs.
I actually do most of my numerical stuff in the Python/NumPy/SciPy stack, and perhaps that is a better choice than Matlab. I'm being a bit contrarian to give contrast to the endless C/Python/JS answers, but Matlab does have a lot of libraries that aren't yet in the NumPy/SciPy stack. On the other hand, you can just write them in C and add them to Python if you need them. Trends are changing, but everyone I know that is into heavy math/algorithmic work is pretty handy at Matlab. I'm solely getting work to switch over to Python. Even then, down in the guts NumPy and SciPy are Fortran - you kind of need to know that stuff if you want to be a wizard and not a glue sticker.
Yes, I recognize this is a deeply individual answer that won't resonate with many. Variety is good, I think.
*edit: okay, Python/NumPy/SciPy stack wins over Matlab, even though STEM schools are still churning out Matlab jockeys. Like it or not, we do need to glue a lot of stuff together, and Python is fantastic at it. I'll leave my original answer here, as I assume the point of the thread is 'food for thought'.
First I will say, in addition to the 3 that I will mention, you should have some level of experience with Javascript, ES6 and Node. This is due to the pervasive nature of javascript in web development, mobile,realtime and client side build systems.
That aside here are my choices:
For highly scalable, fast and realtime web apps Elixir\Phoenix is my choice for its ruby like syntax, Erlang based language with a framework that has built in websocket support. Alternatively you can go with Golang or Scala\AKKA throwing in some Node for realtime capability.
For medium scale web apps, rapid development, building MVPs. Python\Flask is my choice for an expressive dynamic language and flexible framework with big ecosystem of extensions. alternatively you can go with django, ruby\rails or php\Laravel
For the enterprise, large project, large team, maintainable web apps C# and ASP.NET 5\Signalr is my choice for a dynamically compiled, statically typed, decently scalable with async capabilities framework including websocket support that runs on windows and linux
Alternatively you can go with Java\Scala\Play
2. PHP - There's a reason so much of the web is powered by PHP and that reason is simplicity for small stuff and dirt cheap hosting. PHP scales down better than any other language in that you can fill up a TB hard drive on a 512mb server and all of that code is going to run. It's too useful for the likes of simple sites to forgo, despite its other issues as a language.
3. Go - For high volume concurrency operations and other backbone "must be performant" code. That's where Go really excels and it's significantly faster to write this type of code with Go than with Java. Go just isn't there yet for your typical "websites" so it tends to be better for backend operations or APIs.
Note: I'm purposefully leaving Javascript off of the list because while it is necessary to know, fluency isn't required - similar to SQL. If either of those are list-worthy, then I'd choose SQL sheerly for scaling sake.
1. Javascript because there is no other choice for the browser. Even things that compile to JS will occasionally have you debugging the transpiled code to figure out what went wrong;
2. C. This is really C or C++ as you need something that's close to the metal and on some occasions nothing else will do. C probably edges out C++ in terms of versatility here;
3. Honestly, it'd probably be Java, which makes me sad. I'd like it to be Go but Java is just too ubiquitous and useful to ignore. It covers you for both a ton of web apps and Android development.
An alternative to (3) is really Python. The above list doesn't include any scripting languages, which is a weakness. Python covers this but really loses (first class) Android support. I don't like Python for large systems either.
For fun it might look a lot different eg Go, Swift and yes even C++. It really depends on what your goals are.
- OCaml: my favorite (at least at the moment) functional programming language and a very good choice when writing compilers and static analyzers, which is my main research area.
- Rust: a safe system programming language with a lot of good ideas imported from languages that I respect, and also with its own new things (i.e. borrow checker). I feel it's going to be a very important language in a few years.
- C: although I predict that Rust is going to become very big, C will always be there. Though not my favorite language by a long shot (I'm way too bad a programmer to be expected to handle it properly), its importance can't be denied and being knowledgable in C will be a skill that will be useful and desirable for a long time.
Clojure is a powerful and simple language that gives you access to the jvm and the web. The community follows a composable library based approach to functionality which allows you to really understand how your stack works.
Rust, because it's a safer alternative to c/c++ but still allows you to be bare metal. Want to work on microcontrollers? No problem!
So combined Clojure and Rust fluency give you the ability to develop for pretty much everything and they are incredibly powerful in their own rights.
And finally c# because it's a nice language with lots of well paying jobs.
It's telling that its not about the language but how you can use it.
I think I've used Javascript once in the past 10 years or so. I work on all sorts of interesting stuff in five languages (C++, Rust, Python, Lua, Swift), just not on the web.
C++ - yes low level programming, stable, lot's of resources, general usage and lot's of great libraries.
Python - Modern and easy scripting language. This to me is the swiss knife (and replaced Perl) of modern scripting programming languages. It can be used in nearly every project.
Swift/Rust - Both are great languages, I believe both will have a great future maybe Rust will take more time to gain traction.
2. (E)Lisp: Emacs is just too damn awesome, especially if you are limited to just three languages.
3. JavaScript: I guess to be able to do web dev (both client and server side) would be kinda nice?
I'm actually bit surprised that no one else had mentioned Elisp so far, I would have assumed there were some Emacs guys here.
Python: gluing things together, prototyping, data munging/analysis, web development, ad-hoc non-relational data manipulation.
Java: Rock solid, widely used, maniacally backwards compatible, and easy to find work.
SQL: Imo the best way to handle relational data (and in my experience, almost all data I've seen has been relational).
2. F# - Great functional language that's compatible with C# and runs on Mono.
3. TypeScript - Nicer to use Javascript, with added type safety.
They all are first-class in Visual Studio, which is a big plus.
I'm writing as a mostly server side developer: - C: It is good to know low-level programming. (ASM would be a good pair). C is prevalent: Linux kernel is written in C. - JAVA: if you want cross-platform and GUI - Python: if you want something quick and dirty
Python: for when I need to get stuff done.
C: for when I need to talk to hardware.
client-side/low-level server-side/high-level server-side
1 JS
2 JavaEE
3 C
If yes Assembly goes to the top
C - Pretty much everything is built on top of C right now.
Javascript/html/css (using Flow to add a robust type system, since dynamic typed languages are shit for long term ease of development)- Required if you want to do anything web plus its the only true cross platform GUI to use on top of your F#.
How can you cheat more than Haskell? Couldn't you just put everything in IO in Haskell to get the same (or at least similar effect)?
That way I could still find a job in ten years from now.