Re: [elixir-core:11766] Proposal: Expression-based Inspect implementation for URI

2024-05-31 Thread José Valim
There are some issues with this proposal: 1. URI parse does not validate, it only parses the components, which means inspecting with URI.new! after URI.parse! does not guarantee it will be parseable and return the same result back. 2. URI.new! (and similar) hide the underlying fields of the URI,

[elixir-core:11766] Proposal: Expression-based Inspect implementation for URI

2024-05-31 Thread Wojtek Mach
The current inspect implementation is pretty verbose: ```elixir iex> URI.new!("https://elixir-lang.org";) %URI{ scheme: "https", userinfo: nil, host: "elixir-lang.org", port: 443, path: nil, query: nil, fragment: nil } ``` I'd like to propose a more concise one along the lines of "E