Yes. 👍 I'm proposing:
def inspect(item, message) when is_binary(message) do inspect(:stdio, item, label: message) end https://github.com/elixir-lang/elixir/blob/v1.11.4/lib/elixir/lib/io.ex#L421 The reason is just a small quality of life improvement. 😄 Please let me know what you think! - Faisal On Wednesday, April 21, 2021 at 11:42:53 PM UTC-4 [email protected] wrote: > There's already a label option in the docs: > > IO.inspect(1..100, label: "a wonderful range") > > On Thu, Apr 22, 2021 at 11:35 AM Faisal Alghurayri <[email protected]> > wrote: > >> Hello friends, >> >> Thank you for your great work in developing and maintaining Elixir. 🙌 >> >> I propose adding another signature to the IO.inspect/2 function where the >> second argument is a binary: >> >> IO.inspect(something, "This message should get shown in console") >> >> I think this is a small quality of life improvement since the developer >> won't need to explicitly pass the `label` option to see an associated >> message. >> >> Best Regards, >> Faisal >> >> -- >> You received this message because you are subscribed to the Google Groups >> "elixir-lang-core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elixir-lang-core/64793786-deea-4902-b450-39f53896c945n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elixir-lang-core/64793786-deea-4902-b450-39f53896c945n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/06452689-f476-456a-afeb-9a7fc58752abn%40googlegroups.com.
