Sylvain Saurel translated this article from CSDN(ID:CSDNnews). https://medium.com/javarevisited/70-years-of-hello-world-with-50-programming-languages-2400de893a97
Over the past 70 years, what problems have emerging programming languages solved for developers? What is the nature of its existence? This article takes “Hello, World” as an example and presents 50 programming languages.
When we learn a programming language, we start with “Hello, World! Start. Every programmer at some point in their career has been exposed to at least one classic “Hello, World! The program. Usually programmers will use a variety of programming languages, many even a dozen implementations.
Another is TTHW (Time to “Hello, World! ) to measure how programmers create a new “Hello, World! Program time.
In how many different languages can you write a “Hello, World! Program, what’s your answer?
Let’s take a step back in the world of computer programming. I’ll show you “Hello, World!” written in 50 different programming languages. The program. It also allows you to see how computer programming languages evolve over time.
01 Assembly language – 1949
Assembly language was founded in 1949. Here’s a classic assembly language for the Intel 8080 8-bit processor, which was later officially launched in April 1974.
bdos equ 0005H ; BDOS entry point start: mvi c,9 ; BDOS function: output string lxi d,msg$ ; address of msg call bdos ret ; return to CCP msg$: db 'Hello, world! $' end startCopy the code
02 Fortran – 1957
The Fortran programming language is a derivation of Formula Translation. It is an assembler imperative programming language, especially suitable for numerical and scientific calculation. The Fortran language was created in 1957 to write “Hello, World! :
PROGRAM Hello WRITE (*,*) 'Hello, World! ' STOP ENDCopy the code
In Fortran 90 or 95, the program “Hello, World! It could be written like this:
PROGRAM Hello WRITE (*,*) 'Hello, World! ' END PROGRAM HelloCopy the code
03 Lisp – 1958
Lisp is the oldest imperative and functional programming language. Originally created in 1958, Lisp eventually became a very popular language in the world of artificial intelligence in the 1970s and 1980s.
(write-line "Hello, World!" )Copy the code
04 Cobol – 1959
The Cobol programming language has just celebrated its 60th anniversary since its founding in 1959. Cobol stands for COmmon Business Oriented Language, which was originally a COmmon Language for writing Business applications. As of 2019, Cobol is still widely used in banking and insurance.
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY "Hello, World!"
STOP RUN.
Copy the code
05 BASIC – 1964
BASIC, an acronym for Beginner’s All-Purpose Symbolic Instruction Code, is a high-level programming language whose main feature is ease of use.
PRINT "Hello, World!"
END
Copy the code
06 Logo – 1968
Logo is designed to make it easier to use the Lisp language and is often called “Lisp without Brackets”. Specifically, Logo is an object-oriented programming language.
print [Hello World !]
Copy the code
07 B – 1969
B, which was created in 1969, is now obsolete, but it still plays an important role because it inspired C, which is still widely used today.
main() { putstr("Hello world! *n"); return(0); }Copy the code
08 Pascal – 1970
Pascal is an imperative programming language created in 1970. It is designed for the purpose of teaching, and is characterized by clear and rigorous grammar, which contributes to good program structure.
begin writeln('Hello, World! ') end.Copy the code
Turbo Pascal was created in 1983 as an integrated development environment for the Pascal programming language. It was a huge success in the 1980s and 1990s.
program HelloWorld(output); begin writeln('Hello, World! '); readln; end.Copy the code
09 Forth – 1970
Forth is an imperative computer programming language invented by Charles H. Moore in the 1960s, with the first version released in 1970. It was standardized by ANSI in 1994 and adopted by ISO in 1997.
: HELLO ( -- ) ." Hello, World!" CR ;
HELLO
Copy the code
10 C – 1972
The C language was invented at Bell LABS in 1972, when Dennis Ritchie and Ken Thompson were developing UNIX. Ken Thompson previously developed the B language. Dennis Ritchie decided to take inspiration from B and create C by adding types.
#include <stdio.h> int main(void) { printf("Hello, World! \n"); return 0; }Copy the code
11 Smalltalk – 1972
Specifically inspired by Lisp, Smalltalk is an object-oriented, reflexive, and dynamically typed programming language that was invented in 1972. Smalltalk was one of the first programming languages to have an integrated development environment.
Transcript show: 'Hello, world! '; cr.Copy the code
12 Prolog – 1972
Prolog is a logical programming language related to artificial intelligence and computational linguistics. Prolog was created in 1972.
:- write('Hello, World! '),nl.Copy the code
13 ML – 1973
ML is a functional programming language based on Lisp.
print "Hello, World! \n";Copy the code
14 Scheme – 1975
Scheme, created in 1975, is a multi-paradigm programming language that supports both functional and imperative programming. This is one of the three lisp-based languages, along with Common Lisp and the recently created Clojure.
(display "Hello, World!" ) (newline)Copy the code
15 SQL – 1978
The Structured Query Language (SQL) is a standardized computer Language used to operate relational databases. It can also design “Hello, World! .
CREATE TABLE message (text char(15)); INSERT INTO message (text) VALUES ('Hello, World! '); SELECT text FROM message; DROP TABLE message;Copy the code
16 C++ – 1980
Originally created in 1980 by Bjarne Stroustrup as C and class, and later in 1983 as C ++ language. The c++ programming language is now standardized by ISO and is widely used in industry and other fields.
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}
Copy the code
17 Ada – 1983
Ada is an object-oriented programming language developed in the early 1980s and officially released in 1983. The name “Ada” is in honor of Ada Lovelace, the first female computer scientist.
Ada is commonly used for real-time and embedded systems with high reliability and security.
with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Line ("Hello, World!" ); end Hello;Copy the code
18 Common Lisp – 1984
Common Lisp, often abbreviated to CL, is a Lisp language specification standardized by ANSI.
(princ "Hello, World!" )Copy the code
19 MATLAB – 1984
MATLAB, for the “Matrix Lab,” is a scripting language for numerical calculations. This is also the name of the MATLAB development environment.
disp('Hello, World! ')Copy the code
20 Eiffel – 1985
Eiffel is an object-oriented programming language. Eiffel is based on concepts that are very popular today, such as contract programming or reuse.
class HELLO_WORLD create make feature make do print ("Hello, world! %N") end endCopy the code
21 Objective-C – 1986
Objective-c is a reflexive object-oriented programming language. It is an extension of the C programming language, similar to C ++, but very different from C ++ in terms of dynamic message distribution or dynamic loading.
Today, it is mostly used in Apple’s operating system :macOS and its iOS derivatives.
#import <Foundation/Foundation.h>
int main() {
@autoreleasepool {
NSLog(@"Hello, World!");
}
}
Copy the code
22 Erlang – 1986
The Erlang programming language supports several examples: concurrent, real-time, and distributed. It is based on the Actor model with fault tolerance and thermal update capabilities, enabling the development of highly available applications.
io:format("Hello world! ~n").Copy the code
23 Perl – 1987
Perl is a programming language created by Larry Wall in 1987 to easily process text-based information. Perl is an interpreted language that is inspired by the control and printing structures of C as well as shell scripting languages.
print "Hello, World! \n";Copy the code
24 Caml – 1987
Caml is the abbreviation of Categorical Abstract Machine Language, which is a general purpose programming Language for program security and reliability. Caml supports functional, imperative, and object-oriented programming styles. It’s also a very unique language.
print_string "Hello, World! \n";;Copy the code
25 Tcl – 1988
Tcl is a tool command language, a scripting language developed by John Ousterhout in 1988. This dynamically typed language is cross-platform, extensible, easy to learn, and based on 12 grammar rules. Tcl interacts easily with the C programming language.
In 1990, John Ousterhout developed an extension for Tcl called Tk, a library for creating portable graphical interfaces. Therefore, today Tcl is more of a Tcl/Tk combination.
puts "Hello, World!"
Copy the code
26 Haskell – 1990
Haskell is a functional programming language based on lambda computation and combinatorial logic.
main = putStrLn "Hello, World!"
Copy the code
27 Python – 1991
Python is an interpreted programming language with multi-paradigm and multi-platform features. Python supports structured, functional, and object-oriented imperative programming. Python has become very popular over the years and even became one of the most popular languages in 2019.
“Hello, World!” in Python 3.0 or later :
print("Hello, World!" )Copy the code
28 Visual Basic – 1991
Visual Basic, or VB for short, is the third generation event programming language and an integrated development environment created by Microsoft for its COM programming model.
Public Sub Main()
Debug.Print "Hello, World!"
End Sub
Copy the code
29 Lua – 1993
Lua was created in 1993 as a reflexive imperative scripting language for embedding other applications to extend functionality.
print("Hello, World!" )Copy the code
30 Ruby – 1995
Frustrated with his Smalltalk and Lisp experiences, Yukihiro Matsumoto began designing the Ruby language under Emacs in 1993. He published the first edition in 1995. Ruby is an interpreted, object-oriented, multi-paradigm programming language.
puts 'Hello, World! 'Copy the code
31 Java – 1995
Java is an object-oriented programming language created by James Gosling in 1995 and is still the most popular and used language in the industry today. Java allows everything from a client to a Web application, and Google has extended its capabilities further by making it the language for developing applications on the Android mobile operating system.
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Copy the code
32 JavaScript – 1995
JavaScript is a scripting language primarily used for the Web, but you can now use node.js and the like on the server side. JavaScript is a prototype-oriented programming language.
document.write('Hello, World! ');Copy the code
33 PHP – 1995
In terms of programming languages, 1995 was a very important year, as it was followed by Java and JavaScript by PHP. PHP, which is primarily used for the Web, is an object-oriented imperative language that works locally just like any other interpreted language.
<? echo "Hello, World!" ? >Copy the code
34 Rebol – 1997
Rebol is a high-level scripting language that is based on denotational semantics and calls itself a “messaging language.” This is a “Hello, World! :
print "Hello, World!"
Copy the code
ActionScript 35-1998
ActionScript is a programming language for client applications (such as Adobe Flash and Adobe Flex) and servers (Flash Media Server, JRun, Macromedia Generator). ActionScript is used as the scripting language in Unity Graphics.
package { public class HelloWorld { public function HelloWorld() { trace("Hello World !" ); }}}Copy the code
36 D – 1999
D is an imperative object-oriented and multi-paradigm programming language. D was inspired by many languages, including c++, Java, and Eiffel. Despite D’s many virtues, it hasn’t been as successful as its creators had hoped.
import std.stdio; void main () { writefln("Hello, World!" ); }Copy the code
37 C# – 2000
C# was created by Microsoft in 2000 after a dispute with Sun over the Java language. C# is an object-oriented programming language for development on Microsoft. The language is derived from c++ and Java, using their general syntax and some concepts. C# can also be used to develop web applications on ASP.
using System;
internal static class HelloWorld {
private static void Main() {
Console.WriteLine("Hello, World!");
}
}
Copy the code
38 Groovy – 2003
Groovy is an object-oriented programming language that runs on the Java platform. Groovy is an alternative to the Java language, inspired by Python, Ruby, or Smalltalk.
println "Hello, World!"
Copy the code
39 Scala – 2003
Scala is a multi-paradigm programming language designed to express common programming models in a concise and elegant form. Scala integrates the object-oriented and functional programming paradigms through static typing.
object HelloWorld extends App {
println("Hello, World!")
}
Copy the code
40 F# – 2005
F# is a functional, imperative, and object-oriented programming language developed by Microsoft. F# is derived from the highly compatible OCaml programming language. These two programming languages belong to the same family as ML.
printfn "Hello, World!"
Copy the code
41 Windows PowerShell – 2006
Windows PowerShell is a suite of software developed by Microsoft that includes a command-line interface, a scripting language called PowerShell, and a development kit. PowerShell is the standard language starting with Windows 7.
echo "Hello, World!"
Copy the code
42 Clojure – 2007
Clojure is a compiled, cross-platform functional programming language designed to create secure and easily distributed programs. Clojure is one of the three languages based on Lisp. Clojure can be converted to Java code, JavaScript code, and.NET code. As a result, Clojure is available on the JVM, CLR, browser, and Node.js.
(println "Hello, World!" )Copy the code
43 Go – 2009
Go is a compiled parallel programming language inspired by C and Pascal. This language was developed by Google from the original concept of Robert Griesemer, Rob Pike, and Ken Thompson (who invented B language in 1969).
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
Copy the code
44 Rust – 2010
Rust is a multigeneric compiled programming language designed and developed by Mozilla. Rust is “a safe, concurrent, and practical language” that supports pure functional programming styles, the Actor model, procedural programming, and object-oriented programming. Rust is often referred to as one of the potential successors to c++.
fn main() { println("Hello, World!" ); }Copy the code
45 Dart – 2011
Dart is a Web programming language developed by Google. It was originally intended to replace JavaScript. Dart has yet to reach its goal, and the first priority for developers is to convert Dart into JavaScript code that is compatible with all modern browsers. Dart can also be used for server-side programming.
Dart is the language that Flutter uses to develop mobile applications.
main() { print('Hello, World! '); }Copy the code
Kotlin 46-2011
Kotlin is an object-oriented functional programming language that is statically typed and allows compilation on a variety of platforms, including the Java virtual Machine, JavaScript, and native. In 2017, Google made Kotlin the second programming language to be officially supported on Android, after Java.
fun main(args: Array<String>) {
println("Hello, World!")
}
Copy the code
47 Ceylon – 2011
Ceylon, created by Red Hat, is an advanced open source programming language with strong and static typing. Its syntax is similar to Java. It can be compiled to Java or JavaScript.
void hello() { print("Hello, World!" ); }Copy the code
48 TypeScript – 2012
TypeScript is a free, open source programming language developed by Microsoft to make JavaScript code more secure. The TypeScript language is a superset of JavaScript that is converted to JavaScript so that any Web browser or JavaScript engine can use it.
console.log("Hello, World!" );Copy the code
49 Julia – 2012
Julia is a high-level, powerful, and dynamic programming language for scientific computing with a syntax familiar to users of other similar development environments, such as MATLAB, R, or Python.
println("Hello, World!" )Copy the code
50 Swift – 2014
Swift is a compiled, multi-paradigm object programming language designed for simplicity, high performance, and security. It is open source software developed by Apple and thus, along with Objective-C, is a solution for developing mobile iOS applications.
print("Hello, World!" )Copy the code
conclusion
Through this time travel, he wrote “Hello, World! Program, which shows how computer programming languages have evolved over the past 70 years.