Go github.com

Go+ is like Go if it were built for data scientists  ↦

This new data-science-focused language is fully compatible with Go*, but streamlines things for data science use. It simplifies common scripting tasks. This in Go:

package main

func main() {
    a := []float64{1, 2, 3.4}
    println(a)
}

Becomes this in Go+:

a := [1, 2, 3.4]
println(a)

And adds features like list comprehensions for easier data processing:

a := [1, 3, 5, 7, 11]
b := [x*x for x <- a, x > 3]
println(b) // output: [25 49 121]

mapData := {"Hi": 1, "Hello": 2, "Go+": 3}
reversedMap := {v: k for k, v <- mapData}
println(reversedMap) // output: map[1:Hi 2:Hello 3:Go+]

It can be compiled directly to bytecode or transpiled into Go code. Give it a go on the playground.

*I almost described it as a “superset” of Go, but I’m not 💯 if that’s true.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00