One of the common questions that comes up among students new to Computer Science and Programming is along the lines of “what is the best programming language?”. And the the brief answer to that is simple:
You’re doing it wrong.
This requires some elaboration. When one asks “what is the best programming language to learn?” or “what is the best programming language to build video games with?”, it seems that the intent is to get some experience with one specific technology, and stop there. That is a failure of an approach.
A programming language is a tool. Tools have specific purposes. Tools change. New tools, technologies, and techniques becomes available. It doesn’t make much sense to specialize in wielding a hammer over a screwdriver, if one lacks the core skill of following assembly instructions. However unlike this construction analogy, technological tools change rapidly.
“Java will guarantee a corporate job”; “PHP is required for web development”; “Ruby is growing at 400% per year”. A lot of people claim to have a solid idea of where the industry will be and are quick to offer advice, but this can’t possibly be the case. All of those languages — Java, PHP, Ruby, have first appeared in 1995. This means that all the hype that you are supposed to “know” right now, didn’t even exist just 13 years ago. So if you plan on sticking to your favourite high school programming language, chances are that by the time you graduate from a University, you’ll show up at the playfield with a wrong type of bat, so to speak.
Higurashi no Naku Koro ni (episode 9)
But then the question still stays: “what should one learn next?”. Algorithms, data structures, complexity, math… Learn the core abstracts, ideas, and skills that are language independent, and that transfer from one syntax to another. Learn the ability to learn. When a new opportunity with new technology comes along, you should be able to get over the learning curve fairly quickly.
So your “best language”; your “most important programming language to learn next” is the one that will help you do the above. As a tool. As a palette with which to express and explore your ideas. It might be one with the cleanest syntax, or the most documentation, or one that you are already familiar with the most.
It wouldn’t make sense to pick up a yet-another-programming-language just to be able to do what you already can, only with a somewhat different syntax. It’s useless to write the same basic sort in 12 different languages, if all of them are too slow to finish in a reasonable time. Worse yet if you don’t understand why this is so.
So lets drop this obsession with learning to say “hello world” (or some more complicated version of essentially the same) in every programming language one can name. Lets also drop the idea of finding “one language to rule them all; and retire”. Once we put the Science back in Computer Science, it wouldn’t matter which language you’ll end up using.
Clearly D is the best programming language.
Reply to comment
You are doing it wrong.
Reply to comment
Correct!
Reply to comment
I’m surprised that someone could call Computer Science not a form of science considering it embodies every scientific ideal. That you can explore multiple routes (coding languages) and still arrive on the same answer. That is science. Testing, hypothesizing, trying everything you possibly can.
Reply to comment
The answer is easy:
Ruby
And the reason is not because of “Ruby is growing at 400% per year”
but because it is by far the most elegant one out there.
Reply to comment
Elegance is one metric. Ruby is slow.
Haskell is elegant and expressive too, *and* it’s fast.
But it’s hard to understand and some tasks are difficult.
Scheme is elegant, and fast, but the API is really small.
C is fast(est?), but C programs are overly complex.
Erlang is cool, but is cool enough?
Reply to comment
Ugg. Ruby is not elegant in my opinion. Not even close. The syntax for Procs and lambdas in general is atrocious and this is far more important than any class-based, message-passing, built-in OOP paradigm. Gah, I wish I could get all my time spent programming in Ruby back.
Reply to comment
You don’t have to use those features, if you want to limit yourself in ways to express ideas. Though that aside, what language would you consider to be elegant? Bonus points for stating why you think so.
Reply to comment
Smalltalk. The only thing it really lacks is a community.
Reply to comment
Totally agreed. I am only beginning my formal education in CS but I have known this for a while now. In fact I would add something – a language is useless if it’s not used well by the person who learns it. (Or by the person who is a supposedly devoted fan.) A tool is only as good as the person wielding that tool.
Reply to comment
I don’t believe computer science has ever been a science, and I hope it never becomes one, but that’s one very good reason NOT to ‘put the science back in computer science’!
Reply to comment
It is said that Computer Science is not really a science, because it still has “science” as a part of it’s name; as if it’s forced onto there (as oppose to say Physics).
Reply to comment
Science follow the scientific process, computer science doesn’t, hence it’s not a science. Truth be told computer science is more of an art today.
Reply to comment
FYI, Programming is not computer science, and most of us do not practice computer science. We are, at best, engineers.
Computer Science is the study of the natural laws of computation. A good recent example is Stephen Wolfram’s book, “A New Kind of Science” where he proposes a 2 state, 3 color is a Universal Turing machine, to which 20 year old Alex Smith proves it is…
http://www.wolframscience.com/prizes/tm23/index.html
That’s science. Observe natural mathematical phenomenon, make a theory, prove theory.
As far as Computer Science being a “science”. If you study the history of computer science, you’ll find it’s been a mathematical long before us programmers showed up on the scene and that many of the ideas we think are “advanced” today (like lambda functions, regular expressions, etc.) are actually over 50 years old.
Reply to comment
I think I’d rather be accused of being an engineer than a scientist.
It strikes me that given such a broad broad definition almost any discipline can be made to fit the term ’science’. Even things which wouldn’t be considered Science, such as Art.
I’m probably being unreasonable, but I don’t think I’ll concede that computer science is a science.
Reply to comment
> I think I’d rather be accused of being an engineer
> than a scientist.
Who cares what you’d rather be called? You said computer science isn’t a science because it doesn’t follow the scientific process and I’m telling you that you’re wrong because REAL computer science isn’t about engineering or programming as it is about increasing the body of knowledge about computational systems (both natural and man-made).
>It strikes me that given such a broad broad definition
>almost any discipline can be made to fit the term
>’science’. Even things which wouldn’t be considered
>Science, such as Art.
Let me set your mind at ease. The definition of science is a broad one that focuses on bodies of knowledge and expanding bodies of knowledge. If you are not doing that, then you are not practicing a science. Learning a skill or a trade, or just being athletically creative means nothing in terms of science. Hence: Programming != science.
In most academic environments, arts are clearly separated from sciences, but when you start to study art, its origins, and the universal effects art has on the primitive human mind, then you are entering the territory of science.
> I’m probably being unreasonable, but I don’t think I’ll
> concede that computer science is a science.
I don’t think you’re being unreasonable, but I think you’re not seeing how computational systems (and mathematical BEHAVIOR, not language) are rooted in the natural world. Thus, they can become sciences.
Hint: The brain is a computational system, which is why we study the behavior of neurons in computer science. A computer scientist might then assert a theory that neurons, when configured in a particular topology, are capable of computing function f(). He would then, create a model to test his theory on this particular neuron topology and write up a paper detailing his findings. His paper would then be peer reviewed and subject to scrutiny. When it’s accepted, it’s then added to the body of knowledge about computational systems.
That is science.
FYI, I am not a scientist.
Reply to comment
Computer science is science, but what we do is not computer science. What we do is software engineering. Engineering is not science. (That is not a judgement.)
Reply to comment
NP Complete, Algorithmic Complexity studies, language studies, computational theory, all these underly the microprocessor, almost all processes in your operating system, your programming languages, and your software.
Or put it another way, you shouldn’t be speaking here.
Reply to comment
I don’t think your idea of Computer Science is the same as mine then. Perhaps you are talking about software construction/engineering?
I do computer science. I form theories and conjectures, do experiments to evaluate them or even prove them rigorously, write papers, have them reviewed by peers and (if I’m lucky) published. I fail to see the lack of scientific method here.
Reply to comment
I’m studying computer science at the university of Hull; I don’t see what’s so scientific about it.
I’ve done (and am in the process of doing some) theoretical work, I’ve done experiments etc. but I wouldn’t say that’s what I do, or what computer science is about. What we do on a daily basis can only loosely be classified following the scientific method. What a physicist does on a daily basis is science.
Reply to comment
What is computer science about then? Would you call engineering a science?
I think the term “computer science” is too overloaded. There certainly is a lot of science going on, with respect to logic, languages, formal models of computation, security, AI, etc. etc. That’s computer science. Systems, programming, databases, etc. – I’d like to call that software engineering.
Reply to comment
It seems the config for the thread depth cut off too soon, Mark’s reply is below.
Though in my view, Engineering isn’t Science. It applies science and uses the results of science, and so sometimes it might be difficult to see the distinction.
I would agree that there is the pure Science component to Computer Science, and then a whole bunch of stuff (as you’ve said: programming, databases; maybe even IT) that gets wrongfully mixed in and dilutes this image.
Reply to comment
Personally I see logic etc. as mathematics, security etc. as engineering and languages and AI etc. as a cross between art and science.
This odd amalgom of properties and approaches all fall under the banner of computer science.
For me computer science is about creation/invention, with a little descovery thrown in. It’s really not comparable to the natural sciences, at least not in my opinion.
Reply to comment
As oppose to creation/invention with somewhat more discovery thrown in? If so, Computer Science sounds quite comparable to the natural sciences.
Reply to comment
In the natural sciences you set out to discover properties that already exist in nature, and sometimes how to use those properties to your benefit.
In computer science you [largely] create the properties that are most beneficial to you; of course you work within the natural constraints, but for the most part you’re free to make up as you go along: more like philosophy?!
Reply to comment
Not true. There are lower bounds to complexities of algorithms and such properties are defined constraints. The “discovery” is largely done with (or at least require) rigorous mathematical proofs; though even in natural science it’s common for a model to dictate where something should be found.
You can’t just “make up” a O(1) search, even if you really want to.
Reply to comment
You probably don’t know what Computer Science *is*, methinks. I assure you that serious education (not the crap you get at javaschools, but real education from places like MIT or many universities in Europe) pretty much is hard science.
> For me computer science is about creation/invention
Ok, so you really don’t know what it is, you’re confusing “programming” and “computer science”.
Reply to comment
Computer Science is put simply: The study of problem solving. Thats what algorithms are for. Language studies, machine learning, efficiency… its all about how to solve problems.
In Computer Science, we develop and apply tools and processes for solving problems. We abstract the problems out to a more general level, so we can solve them better.
It is neither math, nor science. Its as if we are inventing the tools to build the Empire State building out of thin air. I feel Computer Science is more akin to Art, than Science or Math.
Math itself, in the mathematics field, is highly abstracted out, and this gives the tools to solve simple problems, like in Physics, Biology, etc.
Computer Science does the same thing, but for much more complex problems. Its like moving from single variable calculus, to 1000 variable simultaneous calculus. Some of the greatest visionaries of CS see CS as providing the tools to solve ever more difficult problems in Science.
So, in short, you’re all wrong.
Reply to comment
Lets use proper grammar.
Reply to comment
Certainly the theories behind all these languages are the most important thing to grasp.
That being said, I think C & C++ are probably among the most important. Quite a bit of syntax for other languages is based on these languages, so understanding them can provide lots of insight into the language you need to learn.
Other than that, some language with functional capabilities would probably be wise, considering functional capabilities are proliferating these days. Java is also a good choice. Whatever qualms one may have with Java (folks seem to have quite a few these days), I think the packaging and deployment structures in Java (and associated Java technology) are very helpful in thinking about server-side apps.
In my opinion, students should learn the concepts, but also have a working knowledge of at least 3 languages, and probably be reasonably good at at least 2 of them. Doesn’t matter quite so much which ones, but the process of learning a significant portion of any language is something one should try to go through before having to do it over and over and over again once you start a career.
Reply to comment
You seem to have missed the point. Learning a language for the purpose of later being able to learn another language will get you to that point where you are able to do that “hello-world” in those many languages…
Now what?
Reply to comment
I find it interesting that you while belittling the importance of [programming] languages you recommend learning Mathematics, which is itself just a language!
The argument that a language is anything like a physical tool is so incredibly flawed as to be almost meaningless, yet it’s repeated ad infinitum, mostly by people who have [clearly] given the subject little thought.
It’s much more meaningful to relate a language to a workshop that produces it’s own tools, and uses them to produce even better tools .
Personally I define a language as a medium for thought; programming languages are hence mediums for expressing thought in such a way that a computer can act on them.
You may enjoy this shortish video: Gerald Jay Sussman – The Role of Programming.
http://video.google.com/videoplay?docid=-2726904509434151616&ei=b92lSMiKHoLo4QK9npkc&q=sussman
Reply to comment
Mathematics is not a language. Sure, we use all kinds of domain-specific languages to practice mathematical research, like algebra, number systems, logic etc.
Mathematics is not about these languages nor their expressiveness. Mathematics is about the objects we describe with these languages. In its most basic form, it is about sets and functions, which are concepts that I think are independent of any language.
(Programming) language as a physical tool does make sens. Sure, a “shop” might be more appropriate, but I really don’t see the difference between a shop and a hammer. The important part is the object you want to create (or “express” if you will).
Reply to comment
Programming is not about the language being used, just like mathematics. Linguistics is about the language being used.
Mathematics provides frameworks for reasoning; programming languages provide frameworks for reasoning. Both provide varying notations but these notations aren’t the language; the language is the set of semantic rules coupled with notation.
A hammer is a single atomic tool with limited usefulness. No language exists in this way. You can’t take the hammer and make other tools from it alone. The workshop properly encapsulates the idea that a language is contains many different facilities that can be composed to make new tools.
You can shoehorn programming languages into the “tool” category, but you’re ignoring their many facets. It’s an oversimplification of a complex subject.
Reply to comment
I have to echo Arnar here. Mathematics is not so much about language as it is about MEANING. Mathematics isn’t the study of the standard mathematical notations, rather it’s the study of abstract structures and transformations, which is the fundamental building block of any type of programming.
It’s like this: Learning programming languages without learning about mathematical structures (algorithms, data-structures, functions, sets, graphs, etc.) is like leaning how to write-prose without having any ideas of what to write about. In other words, it’s not so much about your sentence structure and colorful use of adjectives as it is about the content and meaning.
Reply to comment
Adhering to the strong-view of the Saphir-wharf theorem: what meaning exists without language?
Reply to comment
Maybe “meaning” was the wrong word. What I should have said say is mathematics is about study and modeling of fundamental BEHAVIOR, whether it be the behavior of quantities and the manipulation of quantities, graphs, or anything else.
Back to my point: Studying a language that models behavior without studying the natural laws of the behaviors themselves is akin to learning prose without having any ideas of what to write about.
Reply to comment
This, sir, was not very informative.
We should not specialize, but it is useless to learn Hello World in every language. Ha.
Actually your advice is to “learn the language that will make you smart”. Thanks for the tip.
Reply to comment
You don’t get it.
The point isn’t to learn hello world in every language, you stupid obfuscating moron…
the point is to learn how to do a stacks, queues, b-trees, hashmaps, searching, sorting, etc etc etc in several languages, using the syntactic sugar that makes it easiest in that language.
Computational theory shows that Turing Complete languages can all do the same things. In the real world, languages distinguish themselves with syntactic sugar, performance, depth of library and protocol support, installed base, etc.
Reply to comment
Do you *really* think that the important differences between programming languages lies at the “syntaxic sugar” level ?
This is a reductive view. What about language design, programming language theory, and all the fun stuff like that ? Of course, they should not be “more important” than the real point of most programming language users, ie. “get the work done”. But you’re totally neglecting their existence, and they matter.
You also probably knows that Turing completeness is a criteron about function on natural numbers. All languages certainly can’t “all do the same things”.
Reply to comment
You fools, lisp is the language of the gods.
Reply to comment
“what is the best programming language?”
C?
C++?
Java?
Perl?
Ruby?
Python?
“You’re doing it wrong.” “Learn the ability to learn.”
“it wouldn’t matter which language you’ll end up using.”
“technological tools change rapidly. ”
Lisp, sheme, Forth
“It might be one with the cleanest syntax”
Yes, because lisp and sheme can have libraries that will do them with trivial conversion to s-expressions.
Seriously though, the failure to learn from lisp is incredible. After humanity learned about lisp-like s-expressions (in 1958!) all non-s-expression languages except stack-languages should have been depreciated.(Ok, maybe they should have waited until they didn’t need to use punch cards for input!)
Reply to comment
I would argue it is the failure of the amazing lisp to deliver on its oft-vaunted advantages. Where be the LISP operation system that never crashes, starts up in five seconds, and offers amazing 3D effects? Where is the Office replacement written in less than a year?
“After humanity learned about lisp-like s-expressions (in 1958!) all non-s-expression languages except stack-languages should have been depreciated.”
Now that is a dumb statement. I suppose it would make you feel like a special member of an elite Mensa-esque club if the only people allowed to program weren’t allowed to use infix, imperative programming, or nonrecursive implementations.
You’d be working on a vaccum tube computer and a telex readout and an EBCDIC keyboard if you had your way.
Reply to comment
“Now that is a dumb statement. I suppose it would make you feel like a special member of an elite Mensa-esque club if the only people allowed to program weren’t allowed to use infix, imperative programming, or nonrecursive implementations”
You can program imperatively and nonrecursively with lisp. And it is easy to write binary functions in the traditional way with a macro, if you really want to punch yourself in the face. Hell, you could make a macro that takes a string, and allow arbitrary syntax in the string.
The point is that s-expressions showed an easy way to make all-singing all-dancing macros. And they had higher order functions too. Yet new languages like C did not learn from this. Nor did dozens of other languages.
Instead of building on top of the known, they made their own syntaxes, even ones that look a lot like s-expressions with injected stupidity.(Everything based on xml.) They could have made .html and javascript different versions of lisp limited to not horribly hacking you system, or limited to running in one go to make a page. The could have made C its own equivalent with s-expressions.(Working on that.) Scripting would be noncompiled or byte-compiled lisp, internet specifications like html, same with limitations, all could have been lisp.
Reply to comment
I must say I know quite some languages yet I never put myself the problem of which of those was the most important. I always choose one based on how I feel and based on other factors. Considering all this many times I don’t get to choose as many projects are team work..
My advice try to think in algorithms.. Regards
Reply to comment
You’ve got a great point here – there is no “one” best to use, each of them has their own different pros and cons…currently I only know php (and very basically at that) but I haven’t needed anything else, so it suits me just fine!
Reply to comment
I use what works best. Sometimes Fortran is better. Sometimes Ada is better. Sometimes SNOBOL is better. One doesn’t use Mathematica to write operating systems.
Reply to comment
Short of communicating in pure mathematics, the point of learning numerous programming languages is that it facilitates seeing past the syntax to the concepts.
Reply to comment
The best programming language is english. If you can’t write unambiguous, lucid prose, I highly doubt that you can write computer code that anyone, yourself included, will want to look at in 6 months time.
Reply to comment
Nice interesting post, you seem to have opened a real can of worms for some of the people who have posted comments above
Reply to comment
Indeed. It seems that a lot of argument points come down to personal definitions that people have. I guess all of this can be seen as a certain metric of Computer Science being a relatively new field.
Having people mix up Programming with Computer Science doesn’t help things either
Reply to comment
[...] is a great debate going on over at the compsci.ca blog, in the comments, about just what is, or isn’t computer [...]
[...] has taken place on the CompSci.ca forums and blog as a result of a blog post by Tony entitled “The most important programming language”. Many good points were made, especially Tony suggesting that many people become confused between [...]
Interesting title. I have seen programming languages come and go in my day, and have determined that there is not one important language.
When teaching someone about computers, I always tell them: don’t memorize; understand.
I apply this same principal to programming. All languages essentially to the same thing, with different syntaxes. Unless you understand concepts, you can’t program, regardless of the language. First you understand, and then you choose your tool.
Reply to comment
Its true, i agree with paul. You need to understand the logic,OOconcepts . Need to look at the bigger picture how programming works. Once basics are mastered and you master one language then learning new language won’t be difficult. I have seen people who had good concepts in C, C++ learnt java and other scripting languages very very quickly. Good fundamental knowledge of RDBMS is also essential.
Reply to comment
An old programmer told me long ago when I first started working that everytime a new language came out he wrote a “Hello World” app and that put that language on his resume. If you know the logic and concepts behind programming techniques, learning the syntax of a new language is a very simple and easy task.
Reply to comment
An interesting post, as a computer science student myself I do hear that and similar questions pop up. The answer or response however seems to be different every time, it even goes as far as lecturers saying the programming language they teach is the next biggest thing.
Reply to comment
The biggest offenders to this (that I have been exposed to) are high-school students. I tend to believe that the way computer science is taught in high school (as a very closed-circuit system) makes students blissfully ignorant about anything not to do with the language they happen to be working with. Of course, this all has to do with the teacher teaching the course of course.
Reply to comment
Spot on. I’ve heard of the absolutely horrible approaches along the lines of “lets do everything we’ve done last year… but this time with Java”. This really ruins students in a way of steering them towards the “know” programming language mentality.
Reply to comment
Programming language is very much like religion. If you already preferred one, you would not believe what others would say about the other religion.
And you would be very lenient with whatever discrepancy or confusion written in your religion’s ‘bible’.
And you would be very vocal with discrepancy in other religions.
All religions teach good behaviors & good manners. You can be the best person in the neigbourhood if you practice the rules.
However, as a general rule of thumb, stick to major language/religion.
If your religion is too exotic, your country may not have public holiday on its celebration days.
You also may not find many buddies to share problems or joyful moments.
Reply to comment
While it’s true that some developers could get quite fanatical over their preferred tool (see (PHP and ColdFusion) comments here), the main difference that the said developers had to choose the subject of their zeal for themselves (hopefully after trying out multiple languages and making a vaguely educated decision).
Reply to comment
But somehow the knowledge of C/C++ makes it pretty for one to learn these other languages.
Reply to comment
I prefer to believe its matter of personal choice and style.
Some like robust code, and some hardcore oldcshool coding other likdes more elegant and job to be done the fastest and easist way it can not of price on quality.
Looking from the point of someone who wants to develop usefull piece of software that can be integrated and compatible with most established technology used in computer world today my vote goes to JAVA and PHP in combination with MySQL databases.
Reply to comment
Looks like you’ve completely missed the point. The purpose of the exercise was to realize that this is not about any particular flavour of syntax.
But even if it was about actual pieces of technology — how would you define “most established” term, for the purpose of your argument? Both Java and PHP are relatively new (just over 10 years old each). The most “established” (at least in terms of legacy) would still be COBOL.
Reply to comment