LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Languages Worth Learning (http://www.linuxquestions.org/questions/programming-9/languages-worth-learning-756953/)

TaylanUB 09-22-2009 04:28 AM

Languages Worth Learning
 
Programming gurus keep talking about the importance of learning as much different programming language ideas as possible.

When you make a Google search similar to this thread's title, you usually end up either getting a list of tens if not hundreds (heard of 2'500 actually) of programming languages, or catchy ``10 languages every programmers should learn'' articles that include stuff like VB and C#, if you get what i mean.

I managed to find some interesting lists, like this one, but that simply doesn't cut it.

So i was going to ask, what programming languages do you think are worth learning purely for the `enlightenment' you will gain out of being able to think inside their boundaries?

Maybe i'll actually be able to make a nice list in the end, eh?

rizwanrafique 09-22-2009 07:00 AM

It really depends on what kind of programs/systems you want to write. But, for purely enlightenment my pick would be:

- C and then C++
- perl

Others would definitely have their own opinions.

Sergei Steshenko 09-22-2009 07:03 AM

Don't learn languages that push you into corner. I mean, for example, that Haskell is purely functional while OCAml is both functional and imperative - with clear separation. So, considering the choice myself, I would rather learn OCaml (of/when I have time).

A LISP-like language would be interesting too.

Erlang ? Maybe, but look up JOCaml.

But, of course, "C" and Perl :). And maybe even Perl 6 - they seem to make progress lately, and the language is interesting, pretty much keeping up with "there is more than one way to do it", which is good.

choogendyk 09-22-2009 07:24 AM

hmm. So, the question is learning different ways of thinking, to expand your perspective on programming? Maybe history of programming?

I presume you have C and C++ among the languages you list.

To get a sense of numerical methods tools or math tools, perhaps Fortran, or maybe TrueBasic. Note: John Kemeny, who is co-inventor of basic, was a prominent mathematician. After Basic had been corrupted by many implementations, including Microsoft's, he started TrueBasic. That language is specifically designed to give mathematically correct answers and is used in a number of College classes where they are concerned with mathematical concepts. But, it is also of historical interest, just because Basic is different than Fortran or C or C++.

I would put in a vote for PostScript, because of it's reverse Polish notation. Interesting to get your head around. Helps if you happen to use an HP reverse Polish calculator rather than one of the many, more common, inefficient, contorted, parenthetical notation calculators. PostScript has relevance, because it is the driver behind many Laser printers, typesetters, pdf, display PostScript in some unix systems, the Mac OS X display (a variation on pdf), etc.

If you really want to understand computers and programming, then machine language or assembler. Doesn't much matter which CPU architecture -- just to get your head around the kind of things that are going on underneath other programming languages.

Personally, I stay away from anything Microsoft. Period.

Java. I think it's a bit bloated, but it has been adopted by many programming courses. The complaint I hear from some old timers is that it removes the student too far from the hardware, and they end up writing inefficient stuff that ends up using too much memory and other resources.

Then you get into things that might more be considered scripting. Perl for sysadmin. php for web. And how they interact with databases, so things like sql. Perl gets used in programming situations and is used in open source projects along with C and C++. So you might have some front end stuff done in perl and some core stuff that needs tighter performance done in C or C++. Anyway, that could get you into regular expressions, which can be another mental twist.

From there, it stars to get a stretch. Maybe Lisp. I don't know how much it is used now, but it is certainly different. It was used in a lot of AI research, there were LISP chips produced by Texas Instruments, and those went into AI workstations built jointly by Apple and TI -- essentially a Mac IIfx (?) with a Lisp coprocessor.

I'm sure some others will pick up this thread, but those are some of my ideas.

jiml8 09-22-2009 10:57 AM

A few of us amused ourselves over the last couple of weeks on this thread. You might find it to be interesting.

smeezekitty 09-22-2009 02:39 PM

C/C++ for sure
maybe ASM

catkin 09-22-2009 03:05 PM

Strange, being as how the OP was asking about programming ideas, that no one has mentioned the designed-for-teaching languages Pascal and Modula.

APL is out on a limb of its own ... and not one I can say much about!

SQL and COBOL are niche languages and what about some of the real time languages`like CORAL and maybe Ada?

Shellscript is a quirky little darling.

Document automation languages like OOo Basic and Visual Basic inhabit a different world ...

TaylanUB 09-23-2009 12:33 AM

Now those are some valuable replies!

Thanks to everyone's input.

Quote:

Originally Posted by rizwanrafique
It really depends on what kind of programs/systems you want to write. But, for purely enlightenment my pick would be:

- C and then C++
- perl

Others would definitely have their own opinions.

As i said, unlike the languages you have to learn for practical reasons, i was wondering what one would find interesting to learn in his spare time, so what you'll write with it gets irrelevant.

And what would be your opinions?

(Totally off-topic: Are you, by any chance, from a Middle Eastern country? I'm basing this on your account name. (It's always interesting to meet people from your own nation when you visit a forum, that's %60 USA and %35 Europe, from a more Eastern country.))


OCaml, JOCaml and Perl 6 taken note of.

Quote:

Originally Posted by choogendyk (Post 3692786)
hmm. So, the question is learning different ways of thinking, to expand your perspective on programming? Maybe history of programming?

Exactly. All of those, or at least any one at a time...

Quote:

I presume you have C and C++ among the languages you list.
Yeah. It's `the core language' of Unix, allows low level resource management, and is also one of the most used ones (practical reasons). So the awesomeness of C is kinda obvious already.

TrueBasic, PostScript, machine-language/assembler are all taken note of.

Quote:

Java. I think it's a bit bloated, but it has been adopted by many programming courses. The complaint I hear from some old timers is that it removes the student too far from the hardware, and they end up writing inefficient stuff that ends up using too much memory and other resources.
I had read a critique of Java, in the lines of ``You can't approach programming like a plumber in a hardware store.'', but that was more to warn beginners who plan to use it as a learning language, and although from what i hear it's similar to C++, it's a widely used language today, so i'll probably learn it anyway.

Quote:

Then you get into things that might more be considered scripting. Perl for sysadmin. php for web. And how they interact with databases, so things like sql. Perl gets used in programming situations and is used in open source projects along with C and C++. So you might have some front end stuff done in perl and some core stuff that needs tighter performance done in C or C++. Anyway, that could get you into regular expressions, which can be another mental twist.
Perl and PHP are in the list already, together with Python on the top (more for learning purposes).

SQL is taken note of.

Quote:

From there, it stars to get a stretch. Maybe Lisp. I don't know how much it is used now, but it is certainly different. It was used in a lot of AI research, there were LISP chips produced by Texas Instruments, and those went into AI workstations built jointly by Apple and TI -- essentially a Mac IIfx (?) with a Lisp coprocessor.
Lisp is definitely under the list. Firstly the second main dialect Scheme looks really interesting: Supports functional programming, minimalistic approach, they say it has awesome documentation, was used in MIT's introductory programming course (now using Python), i know it to be used as an introductory language at METU (very famous tech-uni over here)...

And i'm interested in the window manager Stumpwm, which is written in Common Lisp for the sake of customizability and all.

---

I'll at least take a look into ASM, APL, Ada COBOL, CORAL and Modula as well.
Pascal is in the list already.

I'm hoping for the opinions of others too.

(By the way, the forum really needs a multi-quote button.

slakmagik 09-23-2009 01:42 AM

Quote:

Originally Posted by catkin (Post 3693289)
Shellscript is a quirky little darling.

That made me literally laugh out loud. :)

This doesn't add anything to the thread but, while I can't exactly thank all 8 posts on this thread and all 81 on the one that jiml8 linked to, in terms of clicking the icons, I wanted to verbally (textually?) thank everyone for a very enjoyable couple of threads. I 'rated' both of them to the max.

Sergei Steshenko 09-23-2009 02:43 AM

Quote:

Originally Posted by TaylanUB (Post 3693737)
...
I'll at least take a look into ASM, APL, Ada COBOL, CORAL and Modula as well.
Pascal is in the list already.
...

Modula looked very good at the time, and probably still does. Then, by the way, if we are talking about Niklaus Wirth, have a look at Oberon too.

I used to program in Pascal for money; Pascal rather than Python should be used in introductory programming courses (if we are talking about imperative languages).

Interestingly, on can declare a function inside function in Pascal, but not in ANSI "C", though in GNU "C" too.

...

They promise all programming paradigms in Perl 6 - let's see whether they'll keep the promise.

...

In Perl 6 they appear to have both strict and loose types - that's an asset.

neonsignal 09-23-2009 03:18 AM

I would argue that when learning concepts, it is worth looking at 'purer' languages, so that you are forced to solve problems within that conceptual framework (instead of taking shortcuts). So for example, while C++ allows a number of programming paradigms, you will find that many programmers default to an imperative style for the bulk of their code.

The historically significant paradigm has been imperative programming. There are concepts such as variables and constants, procedures and functions, and types of parameter passing. However, the risk of learning an imperative language is that it can taint your thinking. They are easy to learn, but there are good reasons why these languages do not scale well. A language like Algol is one of the more elegant imperative-procedural languages, or you could just read Knuth's "The Art of Programming" which uses a pseudo-language to discuss algorithms.

The predominant paradigm (currently) for large projects is object oriented programming. There are concepts such as encapsulation, classes and objects, instances, methods, inheritance, composition, and polymorphism. The iconic object oriented language is Smalltalk, but you could also consider Eiffel or Squeak instead. An interesting variant is the prototype based languages, such as Javascript or Lua. You should also be aware of the concept of design patterns (particularly the Gamma et al book).

The other major paradigm is functional programming. Although it was of early academic interest, there are signs that it will become important as a way of achieving high parallelism. There are concepts such as recursion, side-effects, lambda calculus, and lazy evaluation. A significant functional language is Haskell, but there are many others to choose from.

And these do not cover all the interesting concepts in computer science.

You could learn about declarative programming using a logic programming language such as Prolog. You could learn about concurrent programming using a message passing language such as Erlang. And it would be worth known something about the underlying hardware, perhaps learning a RISC such as the ARM assembly language.

Not to mention regular expressions, relational databases, invariants, optimization, and many other language related issues...

Sergei Steshenko 09-23-2009 04:07 AM

Quote:

Originally Posted by neonsignal (Post 3693871)
I would argue that when learning concepts, it is worth looking at 'purer' languages, so that you are forced to solve problems within that conceptual framework (instead of taking shortcuts). So for example, while C++ allows a number of programming paradigms, you will find that many programmers default to an imperative style for the bulk of their code.

The historically significant paradigm has been imperative programming. There are concepts such as variables and constants, procedures and functions, and types of parameter passing. However, the risk of learning an imperative language is that it can taint your thinking. They are easy to learn, but there are good reasons why these languages do not scale well. A language like Algol is one of the more elegant imperative-procedural languages, or you could just read Knuth's "The Art of Programming" which uses a pseudo-language to discuss algorithms.

The predominant paradigm (currently) for large projects is object oriented programming. There are concepts such as encapsulation, classes and objects, instances, methods, inheritance, composition, and polymorphism. The iconic object oriented language is Smalltalk, but you could also consider Eiffel or Squeak instead. An interesting variant is the prototype based languages, such as Javascript or Lua. You should also be aware of the concept of design patterns (particularly the Gamma et al book).

The other major paradigm is functional programming. Although it was of early academic interest, there are signs that it will become important as a way of achieving high parallelism. There are concepts such as recursion, side-effects, lambda calculus, and lazy evaluation. A significant functional language is Haskell, but there are many others to choose from.

And these do not cover all the interesting concepts in computer science.

You could learn about declarative programming using a logic programming language such as Prolog. You could learn about concurrent programming using a message passing language such as Erlang. And it would be worth known something about the underlying hardware, perhaps learning a RISC such as the ARM assembly language.

Not to mention regular expressions, relational databases, invariants, optimization, and many other language related issues...

And I find functional paradigm more and more appealing.

But, as I've already pointed out using OCaml as an example, in real life one needs several paradigms. That's because. for example, when one needs to make bindings of an imperative paradigm library like gtk+ to a language like OCaml, its functional side is of little use, and imperative helps.

Regarding OO - I think it's a pretty straightforward "consequence" of functional.

Regarding assemblies - not only them, but some knowledge in/of HW - from programmer's point of view, say, RAM can be unlimited (the limits are space/money), but from HW point of view RAM is limited because of load/capacitance/delay issues. I.e. one can't just add and add RAM slots.

P.S. ALGOL was my first programming language.

TaylanUB 09-23-2009 09:07 AM

Quote:

Originally Posted by neonsignal (Post 3693871)
I would argue that when learning concepts, it is worth looking at 'purer' languages, so that you are forced to solve problems within that conceptual framework (instead of taking shortcuts). So for example, while C++ allows a number of programming paradigms, you will find that many programmers default to an imperative style for the bulk of their code.

I'll consider that idea, but don't you think it wouldn't matter because after all you do it for learning, so you'll know that using a shortcut will be of no use to you. (It's like lying to yourself if you get what i mean.)

Quote:

[...] A language like Algol is one of the more elegant imperative-procedural languages, or you could just read Knuth's "The Art of Programming" which uses a pseudo-language to discuss algorithms.
Wikipedia says that C is `imperative (procedural) and structured', while ALGOL is `procedural, imperative and structured'.
Is there a reason that makes ALGOL a better language to learn about imperative programming?

Quote:

[...] And it would be worth known something about the underlying hardware, perhaps learning a RISC such as the ARM assembly language.
I've checked Wiki to learn abour this ARM assembly, and correct me if i'm wrong but in laymans terms it's something like `cellphone assembly'. =P (Used for mobile devices today, they say. Second paragraph: http://en.wikipedia.org/wiki/ARM_architecture)

Quote:

Not to mention regular expressions, relational databases, invariants, optimization, and many other language related issues...
So are those the differing factors in programming languages, aside paradigms? Because i was just asking myself; what else than their paradigms, would actually make different languages (notably those with the same paradigms) worth learning. (Remind you, practical (i.e. getting a job-position) reasons are irrelevant.)

Quote:

Originally Posted by Sergei Steshenko (Post 3693915)
But, as I've already pointed out using OCaml as an example, in real life one needs several paradigms. That's because. for example, when one needs to make bindings of an imperative paradigm library like gtk+ to a language like OCaml, its functional side is of little use, and imperative helps.

I see your point, but as we are already talking about purely learning purposes, wouldn't that matter anyway? You won't be using said languages for the whole of any your serious projects; it's just to learn from the language itself...
For example, when you want to learn functional programming and write something experimental in OCaml, you simply won't go for anything related to GTK+.

Sergei Steshenko 09-23-2009 10:04 AM

Quote:

Originally Posted by TaylanUB (Post 3694203)

...

I've checked Wiki to learn abour this ARM assembly, and correct me if i'm wrong but in laymans terms it's something like `cellphone assembly'. =P (Used for mobile devices today, they say. Second paragraph: http://en.wikipedia.org/wiki/ARM_architecture)

...


...

I see your point, but as we are already talking about purely learning purposes, wouldn't that matter anyway? You won't be using said languages for the whole of any your serious projects; it's just to learn from the language itself...
For example, when you want to learn functional programming and write something experimental in OCaml, you simply won't go for anything related to GTK+.

Regarding ARM I'd put it the other way round - mobile world can't afford stupid inefficiencies of, say, x86. ARM as a processor is very energy efficient. I recently read that ARM was going to develop/manufacture 2GHz processor intended for very energy efficient notebooks.

Regarding, say, OCaml - I would use it in a real life project, and there are pretty serious companies already doing it. So, in a real life project GUI bindings do matter.

TaylanUB 09-23-2009 11:58 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3694283)
Regarding ARM I'd put it the other way round - mobile world can't afford stupid inefficiencies of, say, x86. ARM as a processor is very energy efficient. I recently read that ARM was going to develop/manufacture 2GHz processor intended for very energy efficient notebooks.

That's quite interesting information for me. I'm all for minimalism, simplicity, efficiency, speed, and so on. (In this case it's just efficiency of course.)

Quote:

Regarding, say, OCaml - I would use it in a real life project, and there are pretty serious companies already doing it. So, in a real life project GUI bindings do matter.
And my point was actually that learning a language purely for `learning a new concept', just isn't `real-life'. =P
A friend in another forum made a puzzle solving analogy. Just like people solve puzzles like sudoku, you might be liking to solve programming problems you make up, in languages like BrainFcuk. (But that's a bit of an extreme example.)
I'm definitely adding OCaml to my list anyway, though. And if it is being used more often in real projects, it means that i should actually learn it first, i guess.

(Of course all those languages come after i've learned Python, C/C++, Java, BASH scripting, Perl and PHP, along with (X)HTML and CSS, and maybe XML and JavaScript too... :p)


EDIT

Just wanted to share this interesting information:
http://www.langpop.com/

The page has programming language popularity charts, based on lots of different things like Yahoo Searches, Craigslist, Google Code, Freshmeat, etc.. 7 in total plus a normalized chart.


All times are GMT -5. The time now is 09:48 PM.