hello world:
fn main() {
areas := ['game', 'web', 'tools', 'science', 'systems',
'embedded', 'drivers', 'GUI', 'mobile']
for area in areas {
println('Hello, ${area} developers!')
}
}
http + time:
import time
import net.http
resp := http.get('https://vlang.io/utc_now') or {
println('failed to fetch data from the server')
return
}
t := time.unix(resp.body.int())
println(t.format()) // 2019-08-16 17:48
Python is suitable for beginner and is also easy to write code in different fields. I’m a developer, half of my time is writing code to get things done, and the other half is learning more development techniques, which I’ve been learning for over twenty years.