More Related Content
More from hayabusa333 (20)
Elixir v1.3 で入るかもしれない機能
- 2. 自己紹介
name = 橘田隼一
|> TwitterID = hayabusa333
|> heart = [カーネル, GC, Erlang, Elixir]
|> jobs = 派遣ウェッブプログラマ
|> position = [Joel教, 翔鶴瑞鶴仲良し姉妹同盟]
- 11. Elixir v1.2 例
iex(1)> with {:ok, contents} <- File.read("my_hoge.ex"),
...(1)> {res, binding} <- Code.eval_string(contents),
...(1)> do: {:ok, res}, else: {:error, _}
** (CompileError) iex:1: undefined function with/3
- 12. Elixir v1.3 例
iex(1)> with {:ok, contents} <- File.read("my_hoge.ex"),
...(1)> {res, binding} <- Code.eval_string(contents),
...(1)> do: {:ok, res}, else: {:error, :enoent}
** (FunctionClauseError) no function clause matching in
:elixir_with.expand_else/2
(elixir) src/elixir_with.erl:58:
:elixir_with.expand_else({:error, :enoent},
%Macro.Env{aliases: [], context: nil, context_modules: [],
export_vars: nil, file: "iex", function: nil, functions:
[{IEx.Helpers, [c: 1, c: 2, cd: 1, clear: 0, flush: 0, h: 0, i:
- 14. mix app.tree と mix deps.tree
新規に追加された タスクとして
mix app.tree
mix deps.tree
の2つが追加されました
- 20. 他には
• コンパイル時のモジュールの欠落のエラーメッセージ改善
• File.copy/3 にてIOデバイスのサポート追加
• %module{key: “value”} = struct のような構造体のパターン
マッチが実行できるようになりました。
• Process.sleep/1 のような timeを指定して、プロセスを
sleepできるようになりました。
• Unicode 8.0.0へと更新
• テスト毎に属性をクリーンアップできるように
ExUnit.Case.register_attribute が追加
• MIX_DEBUG=1が設定されている場合にMix.Errorをスタッ
クトレースに表示するようになりました。