On Tuesday, October 25, 2022 at 9:56:14 PM UTC-5 dorga...@gmail.com wrote:

> For the plugs example, how is it better than the alternative that exists 
> today?
>

Because it is written without the magic. The way Plug currently works is 
needlessly nonfunctional and opaque.  With this small change, we could turn 
it from "some compile time magic" into "just more code.

Why write `Plug :accept, ["html"]` when you can just write `accept("html")` 
as part of a standard Elixir pipeline?


Function composition is a key part of FP.
>>
> Agreed, but functional composition(h = g ∘ f) is not the way the 
> overwhelming majority of elixir code is written.
>

Of course, because Elixir doesn't support it. I'm suggesting a simple, 
non-breaking and noninvasice change that would add support. Then, in a 
year's time, we can see if there's any adoption.
 

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/4debfa0c-7489-4e70-8025-be746a40d63an%40googlegroups.com.

Reply via email to