20 Jan 2012 @ 5:52 AM 

I see this question semi-frequently on forums. It’s a reasonable question on the surface. However, the fact is that there is no “Best language for a beginner”. Truly, the very idea that a given computer language could be “better for beginners” than another is downright asinine.

Consider human languages. A person learns language over time, and there isn’t any more difficulty for different languages; the skill develops through practice. Chinese isn’t “harder” to learn than English, for example; but it is harder to learn when you know english.

So how does this extend into computer languages?

Well, the first computer language you learn won’t matter, just as the first Human language you learned doesn’t really matter.For Human languages, the big thing you are learning is how to express yourself to others. For Programming languages, the big thing you are learning is how to express yourself- to the computer.

Once you learn one imperative programming language, the others are easier to learn; same way with human languages. Once you know one germanic language, the others are typically easier to learn.

Of course, it’s harder to learn Chinese or Japanese when you are used to a latin alphabet; for programming languages, this “barrier” is typically found between imperative, Declarative, and functional languages. of course the actual difficulty is not quite at the same level; but functional languages are fundamentally different in many ways from imperative languages, enough that trying to take what you learned via programming in an imperative language and applying it to a functional one can do more harm than good to your learning process, just as trying to apply your understanding of English will harm attempts to learn most non-germanic languages, trying to apply an understanding of Chinese/Japanese/etc to learning English will harm attempts to learn it as well.

Additionally, one issue I find is that many people will say that “language X is easy to learn because it’s like plain english”. Which is a flawed perspective, since that brings with it a lot of language baggage; english is designed for communicating between people; a programming language is designed for communicating between a person and a computer (or rather, the interpreter/compiler which makes it into something the computer understands, but let’s not cloud the issue). So you end up with a psuedo-english language that tries to be declarative but at the same time isn’t english; SQL, for example, is english-like, but I’d be hard-pressed to say that “Select * from Customers Where CX>6” is “plain english”. It’s easy to understand, but it’s restrictive; after all, in english the same concept could be expressed as “choose all fields from the customers table where the record in question has a CX field greater than 6”. But that is far from valid SQL, which has a far more restrictive grammar and syntax. (if it didn’t, parsing it would be a nightmare).

This is how I’ve always felt about it. What is important isn’t what specific language you learn but that you learn the concepts involved; for imperative languages this would be references, functions, recursion, variable allocations,object mutability, (and for OOP languages the various OOP concepts, such as polymorphism, aggregation, composition, delegation, etc). Functional languages, (and some imperative languages that integrate functional features) it’s things like lambdas, recursive definitions,Higher-order/First-class functions (Functions that take other functions as arguments), pure functions, strict versus non-strict evaluation, catamorphism, etc.

Once you learn the concepts, you can use pretty much learn any language with minimal effort, you just need to learn the syntax.(unless you are jumping across a declarative/imperative/functional divide, in which case you also need to learn and relearn other concepts as well). Overall, however, Learning a syntax is easy; the first programming language you learn is hardest no matter which one you choose simply because you have to learn the syntax at the same time you are learning all sorts of “new” concepts. It doesn’t matter what language you choose; it will always be “harder” to learn than later languages for you.

Update 04-15-2012

It has been mentioned that PASCAL, a fictitious language, apparently contradicts my points here. The argument being that languages that are easier to write functionality in will be easier to learn.

However, this misses the point. The ease of learning of a first programming language is absolutely pointless, because it isn’t the syntax or structure of a given language that gives you the tools to coalesce those language elements into algorithms, and therefore solutions, but rather your understanding of base concepts. The argument for PASCAL (again, a fictitious language that doesn’t exist, evidently they truly meant Pascal) was essentially that it needed less code to read and write to the console. For example:

is more “concise” and “easier to learn” than the equivalent java code:

The argument essentially rests on the faulty premise that Writeln() is somehow “easier to learn” than java.out.println(). What such a perspective fails to take into account is the fact that Pascal and java are semantically quite different and based off of different programming models. Pascal is a structured programming language that divides it’s functions into units, but doesn’t (except in later incarnations such as Object Pascal and Delphi) support Object Oriented programming concepts.

This can be examined by merely looking at, say, the Writeln() function. It has more than one argument, and if the first of those arguments is a file handle, the output is written to that file. The requirements for creating and opening a file are less than easy- for example, a file is opened using the Rewrite() function, after you call Assign() to assign a file name to the file handle. Memorizing otherwise arbitrary function names and how they fit into a number of contexts is hardly easier to learn. Java, being Object Oriented bases it’s run-time library on Objects. the System class has a number of static fields that expose a number of System level objects; the “out” field represents the standard output stream, and is an output stream object, in fact; therefore in order to write to the standard output stream, things can be more verbose. In the case that a routine needs to repeatedly access and write to the output stream, it can easily be cached in a local variable- or really any variable at all. The point is that neither language makes it easier to learn the concepts required to implement algorithms. Java has a relatively basic implementation of Object Orientation (it is missing multiple Inheritance, proper generics, functions as objects, and metaclasses), and Pascal is a good implementation of the structured programming paradigm. Object Oriented concepts build upon structured programming concepts, and since you would have to learn the former first, one could argue that Pascal might be a better choice. However, there is still the crux of syntactic difference; additionally, being exposed to Object oriented syntax early on- even if one doesn’t understand it- could make it easier to absorb the concepts behind those peculiarities later on.

Of course, Pascal isn’t a modern language; it’s modern Equivalent, Delphi, fully supports Object Oriented Programming- even better than Java ever will, in fact- but that doesn’t mean it’s either a good or bad choice for a programming language to initially learn. I stick to my original perspective that it doesn’t really matter what language a person learns, what is far more important is they stop beating around a bush on some decision that they think is important and make it. It’s like debating over what type of cake a person should eat first to properly have the cake experience. Thing is- chocolate, spice, vanilla, fruit, etc. Whatever cake one chooses, it’s all cake and your experience is going to initially be coloured by that first cake. The only way to properly experience what a “cake” is is to have a variety of different cakes- the one you eat first is irrelevant. Same with programming languages; the only way to properly experience all the concepts and idioms involved is to learn a variety of different languages. The first one is going to always be a barrier because you have to become accustomed to the more strict grammars and syntax used with programming languages. Unlike a human language- such as english, where misspellings or grammatical ambiguities might confuse the reader or get you weird looks or a laugh here and there, with programming languages the interpreter or compiler is going to take everything you say literally and if it cannot understand what you are saying it will get very cross. Some compilers will put up with more ridiculous constructs- for example, C++ will happily compile code that makes absolutely no sense even to the most trained C++ programmer (and the result makes an equal amount of sense); others are restrictive, and will verbally assault you if you miss a single letter (Pascal, Delphi) others try to help you by doing stupid shit and inserting syntactic characters where it thinks you might need them (javascript). Anyway, my point is, such details aren’t important; the base concepts are there in all languages, just like all cakes are made with certain base ingredients and the unique flavour is added to the cake batter and supplemented (in most cases) with frosting.

Have something to say about this post? Comment!


Responses to this post » (2 Total)

  1. Brony here says:

    Do you still do userbars?

  2. Not really; haven’t made one since I started using photoshop over Paint Shop Pro, at least.

Comment Meta:
RSS Feed for comments

 Last 50 Posts
Change Theme...
  • Users » 47469
  • Posts/Pages » 396
  • Comments » 105


    No Child Pages.

Windows optimization tips

    No Child Pages.

Soft. Picks

    No Child Pages.

VS Fixes

    No Child Pages.

PC Build 1: “FASTLORD”

    No Child Pages.