タグ

ブックマーク / libcello.org (1)

  • Cello • High Level C

    #include "Cello.h" int main(int argc, char** argv) { /* Stack objects are created using "$" */ var i0 = $(Int, 5); var i1 = $(Int, 3); var i2 = $(Int, 4); /* Heap objects are created using "new" */ var items = new(Array, Int, i0, i1, i2); /* Collections can be looped over */ foreach (item in items) { print("Object %$ is of type %$\n", item, type_of(item)); } /* Heap objects destructed via Garbage

    iori_o
    iori_o 2013/05/09
    キチガイの所業。それにしても、こういう風にCを書くなら他の言語を使いそうだな。CはCの書き方で書いた方が楽だ。でも、やってることは楽しそう。
  • 1