2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

V言語でHello, Worldを書いてみる

Last updated at Posted at 2025-12-20
fn main() {
	println('Hello, World!')
}

V言語は、「シンプルさ」「高速性」「安全性」を重視して開発されている、比較的新しい静的型付け言語です。Go言語に似た書きやすさと、C/C++やRustに匹敵するパフォーマンスの両立を目指しているようです。
ガベージコレクション(GC)を持たず、コンパイル時の解析(Auto-free)によってメモリ管理を行うことが特徴です。Rustの借用チェッカーに近い考え方ですが、よりシンプルを目指しているようです。

また、以下に示すようにシンプルになるような言語仕様になっていることが分かります。Goの思想に近いようですが、Goよりもさらにシンプルさを感じます。

  • ループはforだけで、whileやdo-whileは存在しない
  • グローバル変数はデフォルトで禁止( -enable-global-vars フラグで使えるようにできるが非推奨)
  • 変数の再代入はデフォルトで禁止(変更可能な変数を宣言するためには mut キーワードを指定する必要がある)
  • シャドーイングの禁止

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?