Michel Cevzar

Modern programming language syntax similarites

20 Oct 2016 - Ljubljana

Python, Swift, Julia, Go

All have quite similar syntax and one can see how programming languages of the future will look like. In my opinion it is becoming more and more easy to translate a formal spoken English language into code (pseudocode). There is a good chance if you already know how to programm in one off the languages below that you could write some code with minor changes to your syntax.

Let’s have a look at the most classical and usually the first programm someone would run in a new programming language “Hello Word”

Python

print("Hello World")

Swift

print("Hello World")

Julia

print("Hello World")

Go*

*Go a C-style flavour, in the beggining we import the “fmt” (formating) package that we need for “printing” out our code and Go, like C supports main function. The function that actually does what we want fmt.Print("Hello World") looks very similar to the ones above.

package main

import "fmt"

func main() {

    fmt.Print("Hello World")

}