Okay. I'm shutting up here and just tacking this onto
https://github.com/elm-lang/elm-compiler/issues/1145.
On Tue, Oct 25, 2016 at 4:15 PM, Mark Hamburg wrote:
> Here is a very simple failure case that shows that comparing tasks isn't
> necessarily safe (though it does
Here is a very simple failure case that shows that comparing tasks isn't
necessarily safe (though it does succeed if I create two success tasks):
import Html exposing (..)
import Http
task1 = Http.getString "http://somewhere;
task2 = Http.getString "http://somewhere;
main = text <| if task1
I gather there has been trepidation about implementing an equatable built in
"type class" akin to the existing "comparable", but I agree that if the plan is
never to support function comparison, then equatable seems to be necessary if
Elm is to live up to its "no runtime errors" goal.
As for
I also think that comparing functions should just compare them by
reference, this should cover the most common cases.
Another possible solution: What about a compile time error? Is this
possible?
On Wednesday, 12 October 2016 18:48:12 UTC+2, Mark Hamburg wrote:
>
> As discussed elsewhere, the
I basically agree - something as basic as using an equality test should not
have any chance to cause a runtime error in any case; in the case of
functions it should be based on referential equality, which I think does
the right thing in any sane case.
On Wednesday, 12 October 2016 17:48:12
So what's the specific case where you need to verify function reference
equality?
I suspect that needing this is a symptom of some other problem.
On Wednesday, October 12, 2016 at 11:48:12 AM UTC-5, Mark Hamburg wrote:
>
> As discussed elsewhere, the runtime exception related to function