Elixir 函数末尾的 !
或 ?
是什么意思?这对语言来说是特殊的还是仅仅对特定的包来说是特殊的?
ExAws.S3.list_buckets() |> ExAws.request!()
最佳答案
是Naming Conventions在 Elixir 中。
!
调用 Trailing bang
A trailing bang (exclamation mark) signifies a function or macro where failure cases raise an exception.
Functions that return a boolean are named with a trailing question mark.
关于elixir - 的作用是什么?或者 ! Elixir 函数结束时做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59223044/