LoginSignup
0
0

ONYX 触ってみた

Posted at

この記事は、 大阪工業大学 Advent Calendar 2023の18日目の記事です。

onyxとは

wasmへのコンパイルに特化したプログラミング言語
公式ドキュメント

Hello World

use core {*}

main :: () {
    println("Hello, World!");
}

実行方法

onyx run main.onyx

ファイル分割

foo.onyx

// There can be comments before the package declaration.

package foo

func :: () {}

Struct :: struct {}

main.onyx

package main

use foo

main :: () {
    foo.func();
}

演算子

普通の四則演算と同様
比較演算子は, c言語と同様

ポインタ

c言語と同様

感想

まだ, 触ったばっかりなのでメリットがよくわからn

0
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
0
0