Skip to main content

Which is the most difficult programming language to learn and why?

Okay, so lots of bloggers answering this question with joke/parody languages like Whitespace and Brainfuck.  Yes, those are "hard", but they're designed to be hard (if not impossible) to use.
Talking about actual languages intended for real-world production use: it depends.  Let me lay out some broad categories:
  • Languages that are extremely low-level
Examples: Assembler/machine language.  Really old "high-level" languages like FORTRAN or COBOL or C.
In some sense these are "easy" - you just tell the computer what to do, one instruction at a time!  But you have to tell it what to do in fine detail - extremely fine, in the case of assembler.  They were also all developed before graphics and audio processing were commonplace, so anything beyond simple text input/output is extremely complicated.  This makes it very difficult for inexperienced programmers to write large, useful programs.
  • Languages that make you think differently
Examples: LISP/Scheme and other purely functional languages.  PROLOG and other logic programming languages.  Some more specialized low-level languages like FORTRAN.
These all make you formulate your program in a very particular way.
LISP and related languages are very simple - there are only a handful of operators.  But wrapping your head around doing everything recursively and functionally can be extremely difficult.  Writing programs that are inherently stateful in a functional language can be extremely awkward.
In logic programming, rather than giving the computer instructions on what to do, you write first-order logic rules, feed in data, and then perform queries that are evaluated on the data with the rules you specified.  Very flexible, and in some cases (like certain types of language parsing and generation) it's much simpler than imperative code.  But figuring out how to model a problem in that way can be very hard.
Specialized languages like FORTRAN are usually very good at some things (in this case, high-performance math), but everything else is usually hard.  If you're not an expert in that area or not using it for that purpose, it would not be a good language choice.
  • Languages with poorly-defined structure and rules
Examples: Assembler, BASIC, Perl, PHP.
These are languages that provide little or no guidance of how code should be written and structured.  Often there is no or limited scoping/encapsulation, multiple ways to mess with flow of control, and few pesky "rules" like strong variable typing.  (Or any concept of "variables" at all, in the case of assembler.) Perl and PHP also suffer from frequently having many ways to accomplish the same thing.  While in some sense this is "easy" - you can just flexibly do whatever comes to mind at the time while writing code - it makes maintenance of nontrivial programs a nightmare.
  • Languages with a lot of rules and features
Examples: C/C++ (standard libraries in particular), Java, C#, (many others - even an "easy" language like Python has a lot of bells and whistles in its libraries.)
These are languages where there's a steep learning curve to do anything useful, or to understand most existing code.  For example, it's hard to do much real work in C++/Java/C# without an understanding of both OOP and their generic container libraries.  C/C++ requires dealing with pointers and manual memory allocation.  Those are complex subjects in their own right.
Which language(s) are going to be the hardest for a particular person to learn and use will vary from person to person.  Some people find functional programming intuitive, while others have a hard time understanding it at all.  Some people find it easier to understand what's going on in a program when the language forces you to write everything out explicitly, while others get bogged down in the details.  Some people love flexibility, while others value consistency.
Most languages are also very good at some tasks and mediocre or terrible for others - using the right tool for the job makes a big difference.  And while some older languages are largely obsolete these days, (almost) any language that came into widespread use did something better than other existing languages.  At least at the time it was developed...

Comments

Popular posts from this blog

How long would humans survive if the sun disappeared?

Well, we wouldn't die instantly. We already survive every day for 8-16 hours without the sun (depending on the season and location). I'm assuming the intent here is to ask what would happen if the sun were to just suddenly cease to exist entirely. In that case, it would take about 8 minutes for anything to happen to us, since the sun's light and gravity both propagate at that speed. At that point the Earth and moon would just continue on in a straight line, no longer in orbit around the sun. Losing the sun's pull might have some nasty effects on plate tectonics, but I'm not sure about that. The earth would slowly begin to cool. It wouldn't be instantaneous; the atmosphere does a decent job of retaining heat for a time. How long you have here depends on the climate and season where you are. If it's the dead of a snowy winter, temperatures would become nearly unbearable in 24-48 hours. If it's summer, you might have several days. This alone ...

Can a Facebook account be hacked?

Top 15 Ways How Hackers Hack Facebook Accounts #1 Hack Facebook Account Password By Phishing : Phishing is still the most popular attack vector used for hacking Facebook accounts. There are variety methods to carry out phishing attack. In simple phishing attacks, a hacker creates a fake login page which exactly looks like the real Facebook page and then asks the victim to log in. Once the victim logs in through the fake page the, the victims “Email Address” and “Password” is stored into a text file, and the hacker then downloads the text file and gets his hands on the victim’s credentials. How To Avoid Phishing Attacks Never Login your Facebook account on other devices Use Chrome, it identifies the phishing page. Avoid emails that ask you to log in your facebook account #2 Hack Facebook Account Password By Keylogging : Keylogging is the easiest way to hack a Facebook password. Keylogging sometimes can be so dangerous that even a person with good knowledge of computers...

Difference between hacker and cracker?

Hacker: In computing, a hacker is any  skilled  computer expert that uses their technical knowledge to overcome a problem. While " hacker " can refer to any skilled computer programmer, the term has become associated in popular culture with a " security hacker ", someone who, with their technical knowledge, uses  bugs  or  exploits  to break into computer systems. Cracker: A cracker is someone who breaks into someone else's computer system, often on a network;  bypasses  passwords or licenses in computer programs; or in other ways intentionally  breaches  computer security. A cracker can be doing this for profit, maliciously, for some altruistic purpose or cause, or because the challenge is there. Some breaking-and-entering has been done ostensibly to point out weaknesses in a site's security system.