What is the rationale behind *not* throwing an error when you compare two different types in Erlang? (http://erlang.org/doc/reference_manual/expressions.html)
I get that you can sort any collection, because Erlang/Elixir allows you to create heterogenous collections. But I don't think that you should be able to sort them , just to sort them, no?
Something makes me feel icky if I think that some user code would rely on the explicit ordering that is defined in the spec (number < atom < reference < fun < port < pid < tuple < map < nil < list < bit string)
ericmj: Exactly. I was reasoning under the assumption that nobody in his/her right mind would actually need to something like sorting heterogenous lists, but I guess I was wrong about that.
I get that pull-based offers implicit backpressure, but that's about the only reason I can come pu with.
I took it to slack for further discussion. Yes, that could have been the point, but I don't know why they made the decision. Apparently that is. Explicit backpressure is difficult to do, and runs into problems with fundamental distribution semantics.
I found most of them here: https://github.com/elixir-lang/elixir/blob/v1.0.5/lib/elixir/lib/enum.ex#L2230 so I expected them to be there too. I'll look in the streams module perhaps
https://github.com/elixir-lang/elixir/blob/v1.8.2/lib/elixir/lib/stream.ex#L1559 got it.
Given that there is a List and a Map module, why are the defimpl Enumerable not there then?