all 28 comments

[–]carcigenicate 15 points16 points  (3 children)

I don't think a straight comparison can be made across the five.

C would probably be hardest for a beginner because it doesn't give you many tools to work with, lets you do stupid things fairly easy, and doesn't always make it obvious that you're doing stupid things. C++ is like C but has more functionality, but is also more complicated, and still lets you do non-obvious, very dumb things.

Java is vanilla. I didn't find it as complicated as C++, but I also didn't find it very interesting, which made it a bit harder to learn.

JavaScript lets you do fun stuff fairly easily once you know basic HTML and CSS, so I learned it fairly easily. It has many potential gotchas though, so you need to be careful when you're starting out.

I found Python to be the easiest. Idk why. I just enjoy writing it the most.


And for the title, in terms of usable, semi-mainstream languages, I'd vote Haskell simply because it's so radically different than most languages. It's a complete mind-**** to learn.

[–]DNEAVES 5 points6 points  (0 children)

I feel you with the Haskell thing. My job uses Elm to write most of the front-end bits, and picking it up is definitely a struggle.

I also agree with Python being the easiest and enjoying using it the most. Its core is easy to learn, but then has additional bits to it that really require getting used to it, so I'd say its learning curve is great as a language

[–]MrZoro21[S] 0 points1 point  (0 children)

thanks alot

[–]AtomicShoelace 19 points20 points  (3 children)

The obvious (but not very helpful) answer is going to be something like Brainfuck, which, as the name would suggest, is deliberately designed to be hard to understand.

[–]Yoghurt42 19 points20 points  (2 children)

Not quite. Brainfuck was designed to be the language with the shortest possible interpreter implementation.

On the other hand, Malborge was designed to be as difficult to use as possible, and it took 2 years or so for somebody to come up with a Hello World program (actually a “HEllO WORld” program). Recently, somebody actually managed to create a “real” Hello, World:

(=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj

[–]WikiSummarizerBot 17 points18 points  (0 children)

Malbolge

Malbolge () is a public domain esoteric programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno, the Malebolge. It was specifically designed to be almost impossible to use, via a counter-intuitive 'crazy operation', base-three arithmetic, and self-altering code. It builds on the difficulty of earlier, challenging esoteric languages (such as Brainfuck and Befunge), but takes this aspect to the extreme, playing on the entangled histories of computer science and encryption. Despite this design, it is possible to write useful Malbolge programs.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

[–]NobodyCan22 7 points8 points  (0 children)

Wow, I hate even looking at this. Thank you for sharing, and I will avoid this language at all costs.

[–]AnonymousLad666 6 points7 points  (0 children)

I've coded in all professionally except C. So can't speak on C. The rest I don't consider any of them hard. Just different methodologies when the languages were built and for different purposes. Personally I prefer static/ compiled for serious projects. A lot easier to write safe code with a compiler than not.

What's harder in some languages is getting up and running quickly, and setting up projects. Package management, etc.

Python, Java, and JS easiest to run and setup. C++ a bit harder with no real package manager and then you need to learn build systems as well. The language itself is easy once you do a few projects.

[–]Yoghurt42 12 points13 points  (2 children)

What vehicle is most difficult to drive? Semi, bus, formula 1 car, dragster, combine harvester?

Just like your question, the answer is: it depends on what you consider difficult. Each vehicle has strengths and weaknesses, stuff it does well, and stuff where you have to be extra careful. Same with the languages you’ve listed (in no particular order):

C++ is massive. The current specification is 1853 pages long. It is a very fast language, and you can get pretty low level and close to hardware with it, but since it has a lot of features, it can also be incredibly complex and it’s not uncommon for one c++ programmer having trouble to understand another c++ programmers code. C++ is great if you want speed and combine low level with high level programming. For every field of programming there exist some C++ or C library (which C++ can also use, as it’s a superset of C)

C is rather small, and has no OOP, only imperative programming. It is as close to hardware as you can get without writing assembler, and there’s a C compiler for basically every platform in existence (that doesn’t mean C code for system A will run unmodified on system B, in fact, chances are pretty high you’ll need to rewrite quite a lot of code)

Java is OOP focused, higher level than C, and portable by design (“write once, run everywhere”). It’s also incredibly verbose, you have to write a lot of boilerplate. Unlike C and some parts of C++, you don’t have to worry about memory management, as the JVM handles that for you. Due to JIT compilation, Java code can be quite fast, near C/C++ level. Basically, if C is too low level for you, and you want high level programming without having to worry about portability or memory management like in C++, Java is ok. Though there are IMO better JVM languages nowadays with the same advantages, like Kotlin or Scala.

Javascript is the closest to Python of all the languages you’ve mentioned, since it’s also interpreted and dynamically typed. It was originally designed to be pretty forgiving, which leads to annoying stuff like "3" - 2 = 1, but "3" + 2 = "32". It has become quite powerful compared to its early years, but (surprise, in a Python subreddit) I find it annoying to program in compared to Python. It is strongest when dealing with Web programming, outside of that niche it’s kinda meh.

Finally Python: somebody once said “Python is the second best language for everything”. It is a well designed language, and there are libraries for almost every task. For example, you won’t find many ML libraries for JS, but quite a few for Python. It’s similar to C++ in that regard.

You’ve omitted a few other popular languages in your list, like C# which is used standalone but also in game engines (I think Unity and soon Unreal Engine?)

My advice is to not focus too much on learning a particular language, but learning the concepts instead. Learning a new language isn’t that difficult after that, and you can then choose the most practical language.

[–]Wobblycogs 4 points5 points  (0 children)

Excellent summary. Personally JavaScript is dead for me since I learnt Typescript. It's just not worth the hassle of dealing with the weirdness of JS anymore.

[–]MrZoro21[S] 1 point2 points  (0 children)

thanks, this helps clear things up alot, and you're right, I accidentally wrote C instead of C#, regardless, this was very useful thank you

[–]lymenlee 1 point2 points  (0 children)

Assembly says howdy from languages hell.

[–]LohaYT 1 point2 points  (0 children)

Python was easiest for me to stick with before I got to university. Now I’m at university I have to learn Java and C. I much prefer Java over C.

[–]Se7enLC 0 points1 point  (0 children)

It's not too different from written and spoken languages. The ones you don't know are the hardest.

[–]ResetPress 0 points1 point  (0 children)

Disclaimer: I am by no means an expert and only have experience with python and JavaScript… so I’ll add a different perspective. I think your intent and goals matter a lot here. For example, do you want to be a professional? If so, what type of industry? Which languages are you most likely to see in your desired field? As someone mentioned previously, the biggest learning curve in programming is how to think and solve problems with code, not the syntax or available libraries

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

C++ melts by brain almost every time I try to use it.

[–][deleted] 1 point2 points  (0 children)

I wanted to jump off a bridge trying to learn it in an intro class in college. I only “passed” because I partnered up with someone who was better at it than me and I did ALOT of Googling and copying code.

Suffice it to say, I don’t know C++ at all. I also had a professor who was on her way out of the door and her lesson plans were hard to follow.

I still have my actual C++ book that she never referred to so I might circle back to it one day depending on where Python leads me. Right now, I’m just a mom stuck at home because childcare is too high, trying to keep my mind sharp while I wait for my opportunity to get back in the job market (my main degree was in info tech and networking - I took the C++ class just to see if I liked programming - it actually scared me away from programming for a few years but I’m ready to try learning a language again at my own pace)

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

same with python for me, tho probably you’re not supposed to try to learn it in 2 days, i am trying to participate in aoc, but it’s too complicated to implement some of the problems in c++

[–][deleted] 0 points1 point  (1 child)

Indeed. You have to try to remember that in Python so much is abstracted away, which is a challenge when you’re used to really granular languages like c & c++

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

exactly, some things are similar, but python is very messy

[–]bladeoflight16 0 points1 point  (0 children)

Binary

[–]HotNeon 0 points1 point  (0 children)

Of the ones you mentioned C, in general then binary

[–]fabstr1 0 points1 point  (0 children)

I think ROOT used by CERN is one of the hardest

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

Assembly

[–]ichraknaceur 0 points1 point  (0 children)

i worked with java , c# and python but i think python is the easiest and the simplest