4
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?

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

4
Last updated at Posted at 2025-12-23

こちらがY言語のHello Worldです。

module hello
    import printf from "ylib.d"

    main()
        printf("Hello, World!\n")
    end
end

Y言語は教育や小規模システム開発向けに、C言語のエッセンスを取り入れつつ、モジュール化機能を強化したRatforの代替言語です。
ポインタや構造体についての仕様が見当たらないため、C言語から初学者が理解しづらい要素を取り除いたような印象を受けます。

冒頭の import printf from "ylib.d" で参照しているylib.dはY言語の標準ライブラリであり、C言語で言うところの #include <stdio.h> に相当します。

4
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
4
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?