The fact of all programming languages

in #coding6 years ago


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/

Sort:  

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Congratulations @fr3eze! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

You published a post every day of the week

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.27
TRX 0.11
JST 0.032
BTC 64579.45
ETH 3101.05
USDT 1.00
SBD 3.83