Probably the best place to start learning a programming language is to find the features common to most languages. All human languages, for example, use nouns to describe objects and verbs to describe actions. Programming languages have similar common elements.
Let’s begin with one of the first tasks to learn in any new programming language: how to say, “Hello world!” We’ll use a website, repl.it, for these articles. Sign up for an account on repl.it and then create templates for each language to try out these examples, using the top left dropdown list.
To say “Hello world!” in any programming language requires learning how to send text to the computer screen. For example, here’s the line of code in Python:
print(“Hello World”)
and here’s how the Lua language says “Hello world!”:
print “Hello world”
Notice the difference between these two statements? Python uses parentheses to specify what to print on the computer screen while Lua uses a single space.
Having looked at these two similar examples above, can you begin to understand how this PHP code works?
<?php echo ‘<p>Hello World</p>’; ?>
PHP is a language typically used to create web pages and, as a result, it can include HTML-like paragraph (P) tags.
The word echo does the same thing as print. The <?php and ?> bits tell the web server the PHP code in between needs to be processed. And Hello World is to be displayed with HTML paragraph p tags before and after the phrase. Notice the PHP code uses single quotes instead of double quotes like Python and Lua.
When learning a new language, look to see how it prints text to discover both what is common among languages and what is unique to each language.
Learn More
Hello World Program
https://en.wikipedia.org/wiki/%22Hello,_World!%22_program
Exploring Programming Iconic Phrase
https://www.tuple.nl/blog/hello-world-exploring-programming-s-iconic-phrase
20 Best Languages to Start Learning Programming
https://www.simplilearn.com/best-programming-languages-start-learning-today-article
Five Easiest Programming Languages to Learn
https://www.codingdojo.com/blog/easiest-programming-language-to-learn
10 Best Programming Languages for Kids
https://www.create-learn.us/blog/best-programming-languages-for-kids/
How Similar are Programming Languages?
https://hackernoon.com/how-similar-are-programming-languages-9an3u9z
Four Concepts in Every Coding Language
https://ellipsiseducation.com/blog/concepts-in-every-coding-language
Are Programming Languages Actually Languages?
https://www.lucidchart.com/techblog/2021/12/21/are-programming-languages-actually-languages/