V言語とは?
Vは、保守性の高いソフトウェアを構築するために設計された、静的型付けされたコンパイル型プログラミング言語です。
Goに似ており、その設計はOberon、Rust、Swift、Kotlin、Pythonからも影響を受けています。
Vは非常にシンプルな言語です。このドキュメントを読み進めていけば、1時間程度で、この言語全体をかなり習得することができるでしょう。
この言語は、最小限の抽象化でシンプルかつ明確なコードを書くことを推奨しています。
シンプルであるにもかかわらず、Vは開発者に大きな力を与えてくれる。他の言語でできることは、すべてVでできるのです。
https://github.com/vlang/v/blob/master/doc/docs.md
ダウンロード
V言語
The V Programming Language

7-ZIP
7-Zip

GCC
WinLibs - GCC+MinGW-w64 compiler for Windows
WinLibs - MinGW-w64 personal build = GCC for Windows 32-bit and 64-bit - Coming soon: the largest collection of open sou...

インストール
7-ZIP

インストールをクリック

インストール完了
GCC





コマンドプロンプトを開いている場合、一回閉じてから開くようにしましょう
V言語
先ほどダウンロードしたV言語のファイルを解凍します

Cドライブ直下に置きます
C:>cd v
C:\v>make.bat
コマンドプロンプトで「v」フォルダに移動後、「make.bat」を実行します
C:\v>make.bat
C:\v>IF NOT DEFINED VERBOSE_MAKE
Updating TCC
> Syncing TCC from https://github.com/vlang/tccbin
Updating vc...
> Sync with remote https://github.com/vlang/vc
Building V...
> Attempting to build v_win.c with "thirdparty\tcc\tcc.exe"
> Compiling .\v.exe with itself
> C compiler cmd: "thirdparty\tcc\tcc.exe" "@C:\Users\name\AppData\Local\Temp\v_0\v2.exe.tmp.c.rsp"
> C compiler response file "C:\Users\name\AppData\Local\Temp\v_0\v2.exe.tmp.c.rsp":
-Bthirdparty/tcc -std=c99 -D_DEFAULT_SOURCE -g -o "C:\\v\\v2.exe" -Wl,-stack=16777216 -Werror=implicit-function-declaration -I "C:\\v\\thirdparty\\stdatomic\\win" "C:\\Users\\name\\AppData\\Local\\Temp\\v_0\\v2.exe.tmp.c" -municode -bt25 -ldbghelp -ladvapi32 -lshell32
1 個のファイルを移動しました。
Your `tcc` is working. Good - it is much faster at compiling C source code.
> V built successfully
> To add V to your PATH, run `.\v.exe symlink`.
V version: V 0.3.0 56135db
上記になれば成功です
最後に、
.\v.exe symlink
上記コマンドを実行してsymlinkを張ってください
失敗
ダウンロードしたものが以下のエラーで止まって待った
cannot compile on `windows` · Issue #15598 · vlang/v
error: vlib/os/os.c.v:778:25: error: the final expression in `if` or `match`, must have a value of a non-void type 776 |...
これにぶち当たったので
gitから最新のコードを取り寄せたら動きました
HelloWorld
Hello Worldを実際に書いて実行してみます
fn main() {
println('hello world')
}
上記がV言語のHelloWorldのソースコードです
v run .\ファイル名
実行するには`v run ./ファイル名`で実行可能です。

上記はVSCodeで実際に実行した様子です
VSCodeの拡張
VSCodeの拡張機能に公式から出ているV言語用の拡張機能があります。

「V」と検索して、「install」をクリックすると拡張機能がインストールされます
インストール後、きれいなシンタックスハイライトが付きます

おわり
コメント