Elixir v1.4.0發布,函數式編程語言
Elixir 是一種函數式編程語言,建立在Erlang虛擬機之上。它是一種動態語言,靈活的語法與宏支持,利用Erlang的能力來構建并發、分布式、容錯應用程序與熱代碼升級。
更新日志
- [Calendar] Add
Date.compare/2
,Time.compare/2
,NaiveDateTime.compare/2
andDateTime.compare/2
- [Calendar] Support
NaiveDateTime.add/3
andNaiveDateTime.diff/3
for adding seconds (up to microseconds) as well as the difference between two NaiveDateTimes in seconds (up to microseconds) - [Calendar] Add
Date.leap_year?/1
andDate.day_of_week/1
- [Calendar] Ensure
Date
,Time
andNaiveDateTime
APIs work with any struct that provides the same set of fields as their respective struct. For example, aNaiveDateTime
can be given toDate
since it contains a superset of the fields in theDate
struct - [Enum] Add
Enum.map_every/2
that invokes the given function with every nth item - [Enum] Add
min/2
,max/2
,min_max/2
,min_by/3
,max_by/3
, andmin_max_by/3
that allow a function specifying the default value when the enumerable is empty - [Enum] Introduce
Enum.zip/1
to zip multiple entries at once - [Float] Introduce
Float.ratio/1
that returns a tuple with the numerator and denominator as integers to retrieve the given float - [GenServer] Log warn on default
handle_info/2
implementation - [Inspect] Support syntax coloring via the
:syntax_color
option - [Integer]
Integer.digits/2
now accepts negative integers - [Integer] Add
Integer.mod/2
andInteger.floor_div/2
- [IO] Add
:label
option toIO.inspect/2
to help distinguish multipleIO.inspect/2
calls. - [Kernel] Recognize merge conflict markers in source and provide a readable error message
- [Kernel] Warn on unused module attributes
- [Kernel] Improve compiler message on unexpected end of line
- [Kernel] Raise
BadBooleanError
when a non-boolean is given on the left-hand side ofand
/or
- [List] Add
List.pop_at/3
- [List] Add
List.myers_difference/2
- [OptionParser] Expand multi-letter aliases in
OptionParser
- [Process] Add
Process.send_after/4
- [Process] Improve error messages on
Process.register/2
errors - [Registry] Add a local, decentralized and scalable key-value process storage
- [Stream] Add
Stream.map_every/2
that invokes the given function with every nth item - [Stream] Introduce
Stream.zip/1
to lazily zip multiple entries at once - [String] Update to Unicode 9.0.0
- [Task] Add
Task.async_stream/3
andTask.async_stream/5
as well as the supervised versionsTask.Supervisor.async_stream/4
andTask.Supervisor.async_stream/6
- [URI] Allow 0 as URI scheme default port
- [ExUnit.Diff] Use red or green background for whitespace-only diffs
- [ExUnit.Doctest] Allow inspected structures with multiples lines and unicode characters in the doctest result
- [ExUnit.Formatter] Replace lhs/rhs with left/right in the formatter for clarity
- [IEx.Autocomplete] Stop appending a trailing dot when autocompleting modules in IEx
- [IEx.Autocomplete] Support autocompletion for structs
- [IEx.Autocomplete] Improve IEx autocomplete to support navigating map atom keys
- [IEx.Helpers]
c/1
now compiles in memory by default to avoid common issue where.beam
files remain at projects root directory - [IEx.Helpers] Add info about protocols in
i/1
- [IEx.Server] Support interrupting IEx evaluation through the Ctrl+G prompt
- [mix archive] Compress archive files built by
mix archive
as they are now unzipped during installation - [mix archive] Install from SCM
- [mix compile] Automatically infer the list of applications for Mix projects
- [mix cmd] Add the ability to specify one or more apps in
mix cmd
- [mix deps] Warn if there are non-applications in the
apps
directory for umbrella projects - [mix deps] Add warning for invalid paths on
mix deps.clean
- [mix deps] Add
Mix.Project.apps_paths
that returns the paths to children applications in umbrella projects - [mix deps] Add
MIX_REBAR
environment variable for overriding local rebar - [mix escript] Install from SCM
- [mix new] Check directory existence in
mix new
and ask how to proceed if one exists - [mix new] Applications built with the
--sup
flag now have an individual module to work as application callback - [mix test] Add
--formatter
option tomix test
- [mix xref] Provide "did you mean?" suggestions for
mix xref
下載
本站原創,轉載時保留以下信息:
本文轉自:深度開源(open-open.com)
原文地址:http://www.baiduhome.net/news/view/2e7be6e2
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!