最近github上开源了一个"新语言"vlang,火的不得了,我不信,于是乎,尝试了一下,真香。
以下内存均来自https://www.v-lang.cnv语言文档 by 20190701
ubuntu安装vlang

依赖安装
这里采用的是ubuntu的机器,centos的会报错,暂时没有去操作
查看机器型号
1 2 3 | $ uname -a
Linux liwang 4.15.0-54-generic
$
|
安装必要依赖 gcc 和 make
1 2 | $ sudo apt install gcc make -y
$
|
下载编译安装v
1 2 3 4 | $ git clone https: //github .com /vlang/v
$ cd v /
$ make
$ sudo ln -s ~ /v/v /usr/local/bin/
|
测试
1 2 3 4 5 6 7 8 9 | $ v
V 0.1.10
Use Ctrl-D or `exit` to exit
For now you have to use println() to print values, this will be fixed soon
>>> print ('hello world')
hello world
|