LoginSignup
6
6

More than 5 years have passed since last update.

Changelog for Elixir v1.2の一部を翻訳してみました.

Last updated at Posted at 2015-12-10

Elixir v1.2-rc0 が出ましたね :tada:

サッポロビーム#93Changelog for Elixir v1.2 の一部を翻訳してみました.
訳に自信はないので訂正のリクエストなどは随時お待ちしております.

Changelog for Elixir v1.2

v1.2 brings enhancements, bug fixes, performance improvements and more
into Elixir. Elixir v1.2 relies on many features in Erlang 18, requiring
at least Erlang 18+. Upgrading to Erlang 18 is therefore necessary before
upgrading Elixir.

v1.2は拡張,バグフィックス,パフォーマンス改善などをElixirへもたらします.
Elixir v1.2はErlang18に入っている沢山の特徴に頼っていますので,Erlang18以降を必要とします.
従って,Elixir をアップグレードする前にErlangを18へアップグレードすることが必要です.

Erlang 18 support

We have brought many features specific to Erlang 18. Here are the highlights:

Erlang18固有の多くの機能を持ちこみました.ハイライトを挙げます:

  • Maps can now scale from dozens to millions of keys. Therefore, usage of the modules Dict and HashDict is now discouraged and will be deprecated in future releases, instead use Map. Similarly, Set and HashSet will be deprecated in favor of MapSet
  • Compilation times are faster due to improvements in both the Elixir and Erlang compilers
  • Dialyzer now emits less false negative warnings thanks to new annotations available in the Erlang compiler
  • Mapはキー数が1ダースから百万まで(どんなに増えても)スケールできるようになりました.そこで DictHashDict は現在おすすめせず,将来のリリースでは廃止される予定です,そのかわりに Map を使います.同じように MapSet があるので SetHashSet も将来廃止されます.
  • ElixirとErlangの両方のコンパイラの改善によってコンパイル時間が速くなります.
  • Erlangコンパイラーの新しいアノテーションにより,Dialyzerの偽陰性による警告が減ります.ありがたやー:pray:

Language improvements

This release includes four notable language improvements:

このリリースには4つの言語の改善が含まれています

  • The addition of multi aliases/imports/require:
  • 複数の aliases/imports/require を追加しました

    alias MyApp.{Foo, Bar, Baz}
    
  • Support for variables in map keys:
  • 変数をマップのキーに使えるようにしました

    %{key => value}
    
  • Support for the pin operator in map keys and function clauses:
  • ピン演算子をマップのキーや関数の節に使えるようにしました

    %{^key => value} = %{key => value}
    fn ^key -> :ok end
    
  • Addition of the with special form to match on multiple expressions:
  • 複数の式にマッチする with というスペシャルフォームを追加しました

    with {:ok, contents} <- File.read("my_file.ex"),
         {res, binding} <- Code.eval_string(contents),
         do: {:ok, res}
    

These improvements aim to make the language more consistent and expressive.

これらの改善は言語の一貫性や表現力を向上することを目的にしています.

Getting started experience

While we were improving the language, we also improved both the parser and
compiler to be even more aware of language constructs, emitting warnings
on common pitfalls like when piping to expressions without parentheses or
when defining unsafe variables.

言語を改善しているあいだ,パーサーとコンパイラーも改善し,
たとえ言語の構造上起こるようなものでも,
括弧なしで式をパイピングしたり,安全でない変数を定義するような
よくあるハマり所で警告を出すようにしました.

We have also introduced the i/1 helper in IEx, which allows developers
to retrieve information about any data type. This will help newcomers
explore the language values while providing experienced developers with
crucial information about the value they are introspecting.

どんなデータ型でも開発者が検索できるようにIExで i/1 ヘルパーを導入しました.
これは熟練者へ値を調べるのに大事な情報を提供する一方,新人が値を探索する助けにもなるでしょう.
(訳に自信なし)

Workflow improvements

Umbrella applications are now able to share both build and configuration files.
This aims to drastically reduce compilation times in umbrella projects by
adding the following configuration to each umbrella app's mix.exs file:

アンブレラアプリケーションでビルドファイルと設定ファイルのどちらも共有できるようになりました.
以下の設定を両方のアンブレラアプリケーションの mix.exs ファイルに加えることで,
アンブレラプロジェクトにおける抜本的なコンパイル時間の削減をすることが狙いです.

build_path: "../../_build",
config_path: "../../config/config.exs",

Finally, Mix will now consolidate protocols by default as we are now able to
consolidate in parallel and cache the consolidation results, providing the
best performance across all environments without affecting compilation times.
This can still be disabled by setting consolidate_protocols: false in the
project config.

最後に,Mixはプロトコル統合を並列できるようになったので,
プロトコル統合をデフォルト動作とし,その結果をキャッシュします.
これは全ての環境でコンパイル時間の影響を受けずベストパフォーマンスを提供するためです.
consolidate_protocols: falseとすれば無効化できます.

These are great additions on top of the faster compilation times we have
achieved when migrating to Erlang 18.

Erlang18へ移行したことで,コンパイル時間を速くするという素晴しい付加機能を獲得できました.
(訳に自信なし)

Rebar 3 support

With Rebar 3 support gaining more adoption in the Erlang community, Mix is
now able to fetch and compile Rebar 3 dependencies. This feature is currently
experimental and therefore opt-in: if you have a Rebar 3 dependency, you can
ask Mix to use Rebar 3 to compile it by passing the manager: :rebar3 option.
Once configured, Mix will prompt you to install Rebar 3 if it is not yet
available.

Rebar3をサポートすることでErlangコミュニティーで採用されやすくなります.
MixはRear3の依存関係を取得,コンパイルできるようになりました.
この特徴は実験的なのでopt-inとしています: もしRebar3の依存関係があるなら,
manager: :rebar3オプションをMixへ渡し,Rebar3を利用するためのコンパイルを要求できます.
一度設定されると,MixはRebar3が無い場合にインストールするか尋ねるようになります.

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