The fact of all programming languages

The fact of all programming languages


Some fun but mind-blowing fact for the computational knowledge I’ve learnt through the first week of this course:

Nearly all programming languages is capable of solve any computational problem.

The keyword here is Turing Completeness. C, C++, C#, (Visual) Basic, Pascal, Python, Java, Ruby, Objective C, Perl, Swift, and so on are all Turing complete programming language that has been used to create masses of software and programs.

To achieve Turing completeness, a particular must be able to complete this 6 primitive:


  • Right: Move the Machine’s head to the right of the current square

  • Left: Move the Machine’s head to the left of the current square

  • Print: Print a symbol on the current square

  • Scan: Identify any symbols on the current square

  • Erase: Erase any symbols presented on the current square

  • Nothing/halt: Do nothing

Maybe this little video would help you better in understanding the theory.

In short, any languages can achieve this six primitives can solve any computaional problems(regardless of effectiveness) which also reveal the my biggest, constant question in the mind:

Anything that can be done in a programming language can be done as well in other languages.

Provided they are Turing complete, of course.

Being someone who always fancy of the power of programming but not willing to fork out the time and effort to learn one(shameful, but I’m picking up now), the constant questions in my head were probably “Can Python replace Javascript?“ “What this feature be done in C instead of R?

The answer is probably yes, most of the time. In fact, a better question is, Is X language more effective than Y language in programming Z function?


Image taken from http://www.felienne.com/archives/2974


Posted from my blog with SteemPress : https://fr3eze.vornix.blog/the-fact-of-all-programming-languages/


This page is synchronized from the post: ‘The fact of all programming languages’

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×