Speaking of programming languages, there are 2500 high-level languages in the world. Programming languages have their own characteristics, but the basic logic is almost the same.
TIOBE is a well-known indicator of the popularity of programming languages. We update the ranking every month. The figure below is the latest data for April 2020. Overall, Java and C haven't changed in popularity over the decades.
For programmers, it's mostly from Hello World when they start learning development languages. This article has implemented Hello World in 40 programming languages. Let's see what the differences are between each language.
#include <stdio.h>
int main(void){
printf("Hello, World!\n");
return 0;
}
#include <iostream>
int main(){
std::cout << "Hello, World!\n";
}
class HelloWorldApp
{
static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSLog(@"Hello, World!");
}
return 0;
}
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello, World!");
}
}
document.writeln('Hello, World!');
console.log("Hello, World!");
<?php
echo "Hello, World!";
?>
print("Hello, World!")
fun main() {
println("Hello, World!")
}
import Swift
print("Hello, World!")
cat("Hello, World!")
fn main() {
println!("Hello, World!");
}
package main
func main() {
println("Hello, World!")
}
echo 'Hello, world!'
use strict;
use warnings;
print("Hello, World!");
Write-Host 'Hello, World!'
puts "Hello, World!"
SELECT 'Hello, World!';
DECLARE
BEGIN
SYS.DBMS_OUTPUT.PUT_LINE('Hello, World!');
END;
System.debug( 'Hello, World!' );
println "Hello, World!"
object dev
{
// Main Method
def main(args: Array[String])
{
// prints Hello World
println("Hello, World!")
}
}
disp('Hello, World!');
print("Hello, World!")
putStrLn "Hello, World!"
println("Hello, World!")
void main() {
print('Hello, World!');
}
IO.puts("Hello, World!")
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line("Hello, world!");
end Hello;
namespace NSMain;
entrypoint
function main(): String {
return "Hello, world!";
}
import std.stdio;
void main()
{
writeln("Hello, World!");
}
printfn "Hello, World!"
display "Hello, world!".
PRINT "Hello, World!"
Imports System
Module Program
Sub Main(args As String())
Console.WriteLine("Hello, World!")
End Sub
End Module
program hello;
begin
writeln( 'Hello, World!' );
end.
(print "Hello World!")
program hello
print *, 'Hello, World!'
end program hello
section .text
global _start
_start:
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 0x80
mov eax,1
int 0x80
section .data
msg db 'Hello, World!',0xa
len equ $ - msg
Recommended Posts