いきなりまとめ
「Elixir」の言語としての特徴
- 動的型付けの関数型言語
- メンテナンス性と拡大性を志向した設計
- Erlang VM上で動作
- コーディングの速さ
- Erlang由来の耐障害性(fault-tolerance)、並行性(concurrency)、高パフォーマンス
- 高い保守性
きっかけ
WEBサービスを作るにあたって、サーバーサイドの言語で生産性の高い言語は何かと気になった。
生産性が高いとは以下のことを念頭に置いた。
- 言語の習得時間が短い
- 単位機能の実装時間が短い
- メンテナンス性が高い(可読性、可変性)
Elixirとは何か。
メンテナンス性、拡大性を志向した動的関数型言語。Erlang VM上で動作。(Elixir公式サイト)
2011年に生まれた言語ながら既にPinterestにて採用されているらしい。(ウィキの記事)
Today I Learned
色々検索したが印象に残ったのは以下の記事。
What is the single Most Productive Web and REST Framework (once you are fluent in it)?
で見つけたNicolas Hugodotなる人物の投稿によると、
"Erlang, Clojure, Ruby and Rails, Python, Lisp, etc"のいいとこ取りをした言語でブームがくるぞ、らしい。
My advice after loooong talks, readings, etc.:
Elixir/Phoenix/Elm.
They just made a fabulous job grabbing the best of all existing tools from Erlang, Clojure, Ruby and Rails, Python, Lisp, etc.
and made it as easy as possible. Pleasure + readability + power (macros etc) = boom. For one or n dev teams
Ruby on Railsの開発者 Christian Nelsonの記事、
Elixir and Phoenix: The Future of Web APIs and Apps?によると、
Elixir+Phoenixを使ってアプリを書き直した際に5-6developer-weeksを要したとのこと。
その経験曰く、
- Elixir+Phoenixの生産性はとても高い
- ただ、 経験不足とライブラリ群が未発達ゆえまだRubyほどの生産性には達していない
- Elixirの生産性は向上しつづけRubyを追い越す
- PhoenixはRailsより速い(400ms vs 1.5s-2.0s)
- 1000ユーザーあたりのコストは他のプラットフォームより遙かに低い
- 時間とともに肥大化するアプリでもPhenixならメンテは簡単
Phoenix applications will be more stable and less bug prone given the functional/immutable nature of Elixir.
This will be hard to measure, but I think we’ll be able to make a reasonable judgement call after a few months.
短期の生産性のみならず長期の生産性も高い。
まさに探していた言語じゃないかと思った次第。