To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Types of programming languages5.1

There are many different programming languages out there much like there are different spoken languages in the world. Programming languages have the benefit of becoming richer in syntax at the cost of performance (or taking longer to actually write) without making much difference to the outcome of the program. For instance, here are five implementations of the same program in different languages that I know:

JavaScript
var x = 10;
var y = 20;
console.log(x * y);
PHP
$x = 10;
$y = 20;
echo $x * $y;
Java
int x = 10;
int y = 20;
System.out.println(x * y);
YASS
$x = 10;
$y = 20;
print ($x * $y)
VB.NET
Dim x As Integer = 10
Dim y As Integer = 20
Console.Write(x * y)

 

 

Feedback 👍
Comments are sent via email to me.