Table of contents:

  1. Go
  2. JavaScript
  3. Java
  4. C#
  5. C
  6. Python
  7. Ruby
  8. Elixir

When the first time you want to write something in some programming language, probably first what you will write will be: Hello World. Below are examples of Hello World in different languages.

Go

package main
import "fmt"
func main(){
    fmt.Printf("Hello World\n")
}

Go, also known as Golang, is a statically typed, compiled programming language designed at Google by Robert Griesemer1, Rob Pike2, and Ken Thompson3. Go is syntactically similar to C, but with memory safety, garbage collection, structural typing, and CSP-style concurrency.

There are two major implementations:

Google’s self-hosting compiler toolchain targeting multiple operating systems, mobile devices, and WebAssembly. gccgo, a GCC frontend. A third party transpiler, GopherJS4, compiles Go to JavaScript for front-end web development.

JavaScript

console.log("Hello World");

Often abbreviated as JS, is a high-level, interpreted scripting language that conforms to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.

Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide Web. JavaScript enables interactive web pages and is an essential part of web applications. The vast majority of websites use it, and major web browsers have a dedicated JavaScript engine to execute it.

As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative (including object-oriented and prototype-based) programming styles. It has APIs for working with text, arrays, dates, regular expressions, and the DOM, but the language itself does not include any I/O, such as networking, storage, or graphics facilities. It relies upon the host environment in which it is embedded to provide these features.

Java

class Hello{
    public static void main(){
        System.out.println("Hello World");
 }
}

General-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere (WORA)5, meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM)6 regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but it has fewer low-level facilities than either of them. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client-server web applications, with a reported 9 million developers.

C#

class HelloWorld
{
    static void Main()
    {
        System.Console.WriteLine("Hello World!");
    }
}

Is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed around 2000 by Microsoft as part of its .NET initiative, and later approved as an international standard by Ecma (ECMA-334)7 and ISO (ISO/IEC 23270:2018)8. Mono is the name of the free and open-source project to develop a compiler and runtime for the language. C# is one of the programming languages designed for the Common Language Infrastructure (CLI).

C

#include <stdio.h>
main()
{
    printf("Hello World!\n");
}

Computer programming language supporting structured programming, lexical variable scope, and recursion, while a static type system prevents unintended operations. By design, C provides constructs that map efficiently to typical machine instructions and has found lasting use in applications previously coded in assembly language. Such applications include operating systems and various application software for computers, from supercomputers to embedded systems.

Python

print('Hello World!')

Is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum9 and first released in 1991, Python’s design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. Python is often described as a batteries included language due to its comprehensive standard library.

Ruby

puts 'Hello, world!'

Ruby is an interpreted, high-level, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro Matz Matsumoto10 in Japan.

Ruby is dynamically typed and uses garbage collection. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. According to the creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, Basic, and Lisp.

Elixir

IO.puts "Hello world!"

Functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine (BEAM). Elixir builds on top of Erlang11 and shares the same abstractions for building distributed, fault-tolerant applications. Elixir also provides productive tooling and an extensible design. The latter is supported by compile-time metaprogramming with macros and polymorphism via protocols.


Reference:

  1. Mono, Corss platform, open source .NET framework
  2. Wikipedia, The Free Encyclopedia

Annotations:

  1. Robert Griesemer is one of the initial designers of the Go programming language. Prior to Go, Robert worked on code generation for Google’s V8 JavaScript engine, the design and implementation of the domain-specific language Sawzall, the Java HotSpot virtual machine, and the Strongtalk system. 

  2. Robe Pike is a Canadian programmer and author. He is best known for his work on the Go programming language and at Bell Labs, where he was a member of the Unix team and was involved in the creation of the Plan 9 from Bell Labs and Inferno operating systems, as well as the Limbo programming language. 

  3. Ken Thompson s an American pioneer of computer science. Thompson worked at Bell Labs for most of his career where he designed and implemented the original Unix operating system. He also invented the B programming language, the direct predecessor to the C programming language, and was one of the creators and early developers of the Plan 9 operating system. Since 2006, Thompson has worked at Google, where he co-invented the Go programming language. 

  4. GopherJS compiles Go code (golang.org) to pure JavaScript code. Its main purpose is to give you the opportunity to write front-end code in Go which will still run in all browsers. 

  5. Write once, run anywhere (WORA), or sometimes Write once, run everywhere (WORE), was a slogan created by Sun Microsystems to illustrate the cross-platform benefits of the Java language. 

  6. A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform. 

  7. ECMA-334 – C# Language Specification 

  8. This specification describes the form and establishes the interpretation of programs written in the C# programming language 

  9. Dutch programmer best known as the author of the Python programming language, for which he was the “Benevolent dictator for life” (BDFL) until he stepped down from the position in July 2018. He is currently a member of the Python Steering Council. 

  10. Japanese computer scientist and software programmer best known as the chief designer of the Ruby programming language and its reference implementation, Matz’s Ruby Interpreter (MRI). His demeanor has brought about a motto in the Ruby community: “Matz is nice and so we are nice,” commonly abbreviated as MINASWAN. 

  11. is a general-purpose, concurrent, functional programming language, and a garbage-collected runtime system.