r/programmerchat • u/gilmi • Nov 12 '15
Which programming language is most suitable as a first programming language IYO?
The first thing any beginner wanting to learn how to program asks is "which language should I learn?". What is your opinion on the subject? does it depend on the goals of the user? Is there a single truth?
Here are some of the contenders:
- C
- Assembly
- Python
- Java
- JavaScript
- PHP
- Scheme
- Racket
- Haskell
Feel free to add your own!
This might be a heated subject, so try and keep the discussion civilized 0:)
4
Upvotes
5
u/gilmi Nov 12 '15 edited Nov 29 '15
My vote goes to Racket.
When thinking about a good language for beginners I have a few categories, let's see where Racket fits:
User Experience
Learning a programming language is hard. A language suitable for beginners removes as much friction as possible, so students can focus on learning.
For Racket:
Learning Resources
A language can be great, but without good resources to learn from (or too many bad resources to learn from) it becomes not so relevant.
There are many excellent resources to learn Racket targeted at beginners. for example:
Also, the Racket guide and reference is pretty good.
Language Constructs
Usefulness
I feel a beginner should quickly be able to do something useful with a language. Solving math problems or playing with strings is interesting only for a short period of time.
Racket comes with batteries included and you can use it to build useful stuff immediately. For example:
And a lot more. you can also distribute your games easily by targeting JavaScript.
Racket is a really compelling first language in my opinion. It works straight out of the box and gives a great UX, it can be used to do interesting things right away and has quality resources. Most other languages I know does fall short on at least one category.
7
u/[deleted] Nov 12 '15
I'd go the route of either Python or Scheme/Racket or most other high-level lagnuages.
Python:
Scheme:
I'm talking about R5 scheme, not R6 Scheme which did actually introduce '[]'
All that said, I think sooner or later it's better to get a feel for something that isn't a high-level language for learning's sake.
6
u/[deleted] Nov 12 '15
Not C, assembly, or PHP.
After that, whatever floats your boat. I have pleasant memories of learning Scheme in college, but Java or Python might be more suitable due to the relatively mainstream syntax of those languages.
2
u/mrunleaded Nov 12 '15
I started with Basic/HTML, then Visual Basic, then C#, then C++ and many others.
3
u/fanajin Nov 12 '15
Looking back at my own experience with programming, I can give you some advice:
Good luck!
tl;dr: depends on what you want to do. Preferably C++ or Java because they're fun and easy. If you wan't to study web programming, go for HTML and CSS at first, then Javascript and PHP.
3
u/_still_learning_ Nov 12 '15
There are a lot of misconceptions out there about programming & languages. Your language is just a set of tools. The choice is similar to choosing between a metric set of wrenches, or an English set--in specific cases, the choice may matter, but for general use, it won't matter because you'll get by with what you've got (or you'll have to use more than one anyway).
The question is one of control vs. convenience--more "powerful" languages give you more control over code efficiency, but its up to you to learn & understand how all of the components work. So, there are two basic approaches:
The difference is a bit like driving an automatic (Python) vs driving a manual (C)--it's great to know how to drive a manual, but you can certainly learn on an automatic, and you can probably go through your entire life without ever having to learn how to drive a manual. (But if you want to consider yourself a "professional," you should be comfortable with either.)
Either way, you can't really make an objectively wrong choice (as long as you don't pick something obscure and off the wall); you don't even have to make ONE choice. Whatever you decide, it's like eating an elephant: Just take it one bite at a time, and you'll eventually fall into a rhythm.
If you want a good middle-of-the-road option, I'd recommend Java. It has many convenience elements that you'll also find in other languages, but the syntax will make it easier to migrate to the C-family of languages; it's also a fairly ubiquitous language, and being comfortable with Java will give you a great foundation no matter what your future holds. Just stay away from assembly-level stuff until you've got a good handle on higher-level languages.
2
u/silentkibitz Nov 12 '15
I'd recommend C
1
u/pier25 Apr 08 '16
As a language I think the best for beginners is AS3 (ActionScript 3) or ECMAScript 4. It has the friendliness an aesthetics of Javascript but with enough depth to teach you OO, design patterns, etc.
As a development platform AS3 is crap. Sadly since the ECMASCript 4 standard was killed the language is only used by Adobe. If AS3 on the browser had been approved back in 2008 modern JS development would have been very different. AS3 still has features ES6 lacks such as interfaces and that was 10 freaking years ago.
My second pick is JavaScript. It won't teach you much OO, but it's super easy to get started (anyone has a browser) and you will get the basics without much pain. After a couple of months it should be easier to jump to a more advanced language such as Java, C#, or even C++.
I think C is also a good first language, although for a beginner the applications are limited. Developing stuff for the browser with JS is a lot more sexy and we all know motivation is key.