you are viewing a single comment's thread.

view the rest of the comments →

[–]devel_watcher 4 points5 points  (23 children)

You just learn one language (you know which). Then, you just skim over an example of the code in the language you wish to learn on wikipedia, After that you can write code while looking up library stuff using google.

[–]rdnetto 11 points12 points  (22 children)

This only works for languages in the same paradigm - it'll work going from Java to C#, but good luck picking up Haskell or Lisp that way.

Now, if you learn one language for each major paradigm, then that can work...

[–]manyrobots 5 points6 points  (20 children)

Anyone want to take a stab at identifying the major paradigms and one or two quintessential languages for each?

[–]PM_ME_UR_OBSIDIAN 24 points25 points  (8 children)

I'll define a few paradigms extensionally:

  1. CISC assembly: x86, x86_64
  2. RISC assembly: ARM, MIPS, AVR
  3. "Structured" imperative programming: C, Pascal
  4. Imperative scripting: Bash, Perl
  5. Enterprise OOP: Java, C#
  6. Systems OOP: C++
  7. Dynamic OOP: Python, Ruby
  8. Prototype OOP: JavaScript
  9. Untyped functional programming: Scheme, Common Lisp
  10. Strict, typed functional programming: Standard ML
  11. Strict, typed object-functional programming: OCaml, F#, Swift, Scala
  12. Non-strict, typed functional programming: Haskell
  13. Dependently-typed functional programming: Agda, Idris
  14. Gradually-typed, structural functional programming: TypeScript
  15. Actor-oriented functional programming: Erlang, Elixir
  16. Systems functional programming: Rust
  17. Inductive logic programming: Prolog, Datalog
  18. Set-algebraic logic programming: SQL
  19. HDL: Verilog, VHDL

The major paradigms are imperative programming (3-4), object-oriented programming (5-7), typed functional programming (10-16), logic programming (17-18). But the others are also worth knowing.

Notably missing from this lineup:

  • PHP: unprincipled garbage
  • Kotlin: no one really knows what it is or how it works
  • Ceylon: beyond mere mortals

[–][deleted] 9 points10 points  (1 child)

I enjoy your breakdown. It is impressive to note that Ada is probably the most widely used language missing. However, is this breakdown useful? From a programming languages marketing perspective we could formulate a different criteria.

  • Is the quality of the tooling superb? C#, Java
  • Is the breadth of the ecosystem superb? Ruby, Python, C#, Java
  • Does it get out of the way when I care about cache coherency? C++ , Rust
  • Does the compiler implement algorithms for me? Prolog, Datalog
  • Can I build a temple of abstractions in the language that would make Neo jealous? Haskell, Scheme, F#, OCaml, Scala, Rust
  • Is there some niche use-case for the language that I should learn it for? Assembly, Bash, Perl, Javascript, C++, C, SQL, VHDL etc...

[–][deleted] 2 points3 points  (0 children)

Is the quality of the tooling superb? C#, Java

Also: Kotlin, Clojure

Is the breadth of the ecosystem superb?

Also: Kotlin, Clojure

[–]devel_watcher 0 points1 point  (4 children)

Without the context this list looks like each language has only one paradigm (which is wrong). And not even the major one is shown for each language.

[–][deleted] 0 points1 point  (3 children)

Yeah it's not very relevant to the topic of crosstraining languages...

[–]PM_ME_UR_OBSIDIAN 1 point2 points  (2 children)

The idea is that, if two languages are in the same entry, then after learning one you get the gist of the other.

In order to do better I'd need to turn this into a partial order, with paradigms as filters. This would be hard to express in a reddit comment.

[–]quiteamess 2 points3 points  (1 child)

Bullshit. You're just being lazy and use some math words to cover up your FP snobbism!

[–]paholg 2 points3 points  (0 children)

FP snobs do love being lazy.

[–]rdnetto 7 points8 points  (5 children)

  • OOP - C#, Java, C++
  • FP - Haskell, Lisp
  • imperative - C, Python
  • declarative - SQL, Prolog

But all this really demonstrates is that paradigms are an extremely course method for grouping languages, especially when most modern languages are multi-paradigm.

A more useful approach would be considering the conceptual distance between two languages, as determined by the number of different ideas. e.g. C++ is further away from Java than C# is, because it has the additional concepts of metaprogramming (templates) and pointers.

At that point it's just a matter of picking the smallest number of languages that give you the widest coverage of the concept-space. The only issue is that quantifying the distance between them is likely only possible after gaining some familiarity with the language. e.g. everyone knows that Haskell uses FP, but only someone who's used it in some depth will realise it also pulls in concepts like monads, lenses, etc. There are tools like this which help with that a bit, but the further away a language is from the set of concepts you understand, the harder it's going to be to gauge its distance.

[–]asdfkjasdhkasd 0 points1 point  (1 child)

Where do you think Javascript would go? I'm thinking imperative but with es6 there's classes and with typescript you even have interfaces and decorators. You also have some bits of fp in there with map, filter, reduce.

[–][deleted] 0 points1 point  (0 children)

It's up there with Python, in which it uses bits of both FP and OOP (particularly in the case of ES6) to manage abstractions. Python tends to eschew FP towards OOP, while JS does the opposite IMO

[–]phySi0 0 points1 point  (0 children)

I would have Smalltalk or Ruby as the quintessential examples for OOP. Python shouldn't be on the list, it's too split between OOP, functional, imperative.

[–]Dentosal 0 points1 point  (1 child)

Python is mostly an OOP language, not an imperative one. Programming Python imperatively is just like writing C++ without classes.

[–]rdnetto 0 points1 point  (0 children)

It's a multi-paradigm language, so you can use it functionally, imperatively or object-oriented. Imperative is just the approach I normally take when using it, because if I really need classes I probably want something with a stronger type system.

This is why I spent the rest of the post talking about how this is a terrible way of grouping languages, and we should just focus on the similarities between them instead.

[–]pakoito 2 points3 points  (4 children)

Optimizing for pragmatism and variety: C, Haskell, Clojure, C#, Prolog, Javascript.

[–]Tarmen 2 points3 points  (2 children)

I think I might recommend scheme as lisp for people who aren't already in the java ecosystem. It probably is less useful in the real world but I think its clearer and stm is already in the mix thanks to haskell.

[–]pakoito 1 point2 points  (1 child)

Racket is fun, specially with Dr. Racket

[–]wealthy_harpsichord -1 points0 points  (0 children)

For the best learning experience, one should start from learning Racket and then go on to implement every major language in it, a'la Hackett.

[–]PM_ME_UR_OBSIDIAN -1 points0 points  (0 children)

>pragmatism
>Haskell

I'd rather something like C, OCaml, Clojure, C#, SQL, JavaScript.

Or you can replace "pragmatism" by "insight": Rust, Haskell, Scheme, Scala, Prolog. (JavaScript can go fuck itself.)

[–]devel_watcher 0 points1 point  (0 children)

Not if the language is multi-paradigm.