Your next programming language from Apple, RedHat, Google, Mozilla, Gnome and Ericsson

  • Swift by Apple: built with the LLVM compiler uses the Objective-C runtime. Influenced by Objective-C, Rust, Haskell, Ruby, Python, C#
println("Hello, world")
  • Ceylon by RedHat: high-level, statically and strong-typed, object-oriented, runtime is JVM. Influenced by Java, Scala, Smalltalk
void hello() {
    print("Hello, World!");
}
  • Rust by Mozilla: general purpose, compiled, concurrent, functional, imperative, object-oriented, structured. Influenced by C++, Erlang
fn main() {
    println!("hello, world");
}
  • Go by Google: compiled, concurrent, imperative, structured, statically-typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities. Influenced by C
package main

import (
   "log"
   "net/http"
)

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
}

func main() {
   fmt.Println("Hello, World")

   // Simple static webserver
   log.Fatal(http.ListenAndServe(":9091", http.FileServer(http.Dir("/var/wwwroot"))))

   // Or using a handler
   http.HandleFunc("/", handler)
   http.ListenAndServe(":8080", nil)
}
  • Vala by Gnome: object-oriented with a self-hosting compiler that generates C code and uses the GObject system. Syntactically similar to C#. Influenced by C#, C, C++
int main () {
    print ("Hello Worldn");

    return 0;
}
  • Dart by Google: goal is to replace JavaScript, relies on a source-to-source compiler to JavaScript, class-based, single inheritance, object-oriented language with C-style syntax. Supports interfaces, abstract classes, generics, and optional typing. Influenced by JavaScript, C#
void main() {
  print('Hello World!');
}
  • Erlang By Ericsson: functional language designed to support distributed, fault-tolerant, soft-real-time, non-stop applications, hot swapping code. Though all concurrency is explicit in Erlang, processes communicate using message passing instead of shared variables, which removes the need for explicit locks (a locking scheme is still used internally by the VM.
% usage: http://localhost:8081/erl/hello_world:service 

-module(hello_world).
-export([start/0,service/3,hello_world/0]).

start() ->
    inets:start(httpd, [
        {modules, [mod_esi, mod_get]},
        {port,8081},
        {server_name,"hello_world"},
        {server_root,"."},
        {document_root,"/var/wwwroot"},
        {erl_script_alias, {"/erl", [hello_world]}}
    ]).

service(SessionID, _Env, _Input) ->
    mod_esi:deliver(SessionID, [
        "Content-Type: text/htmlrnrn", 
        "<html><body>Hello, World!</body></html>"
    ]).

hello_world() -> 
    io:fwrite("hello, worldn").

See The Computer Language Benchmarks Game for performance comparison.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s