「使える」perl6がリリースされた

http://rakudo.org/node/75

公約どうり7月29日に「Rakudo Star」がリリースされた。ダウンロードは上のリンクから。

ステータス

アプリケーションを組んだり、perl6とう新しい言語を探検するには使える。しかし、以下の但書がある:

  • 「early adopters」(冒険者)向け
  • 知られたバグがある
  • まだ遅い
  • Perl6の一部スペックが未だ実装されていない。(下の「未だ使えないもの」を参照)

Rakudo Starとは何ぞや

perl6の世界では言語の規格と実装を分けて呼ぶのが習慣となっている。今回の「Rakudo Star」は次によるperl6の実装。

使える機能

  • Perl 6 grammars and regexes (ついに! これだけのためでもperl6を使いたい。)
  • formal parameter lists and signatures (関数のプロトタイプ?)
  • metaoperators (マクロのことかな?)
  • gradual typing
  • rolesとクラスを含むパワフルなオブジェクトモデル (普通のクラスシンタックスが使える、、)
  • lazy list evaluation (pythonで言うとgeneratorによるリストにあたるものだろう)
  • multiple dispatch
  • smart matching
  • junctions and autothreading
  • operator overloading (limited forms for now)
  • introspection (perl5でもライブラリでできるようだけど、かなりわかりにくい、、)
  • currying
  • a rich library of builtin operators, functions, and types
  • インタプリタ: an interactive read-evaluation-print loop
  • codepointによるUnicode。(内部表現がperl5のutf8からpythonみたいになったってことかな)
  • resumable exception

未だ使えないもの

このリストを見ると、perl6のポテンシャルがうかがえる。

  • nested package definitions
  • binary objects, native types, pack and unpack
  • typed arrays
  • macros
  • state variables
  • threads and concurrency
  • Unicode strings at levels other than codepoints
  • pre and post constraints, and some other phasers
  • interactive readline that understands Unicode
  • backslash escapes in regex <[...]> character classes
  • non-blocking I/O
  • most of Synopsis 9
  • perl6doc or pod manipulation tools

「binary objects」ってのは面白そう。沢山作るオブジェクトはメモリ節約のためにCのstructのようにバイナリでpack/unpackするなんて技があるけども、これを言語レベルでサポートするものだったら素晴しい。
コンパイラが使うパーサが環境に組込まれているので、マクロが使えるようになるらしい。lispのようなマクロ機能が備わるのだとしたら凄い。

リンク

Rakudo Starは月一のスケジュールでリリースされる。次の予定日は8月24日。