Hacker News new | ask | show | jobs
by the_gipsy 2333 days ago
I guess Evan really wants that function to get rewritten in Elm - after all it's synchronous.

There should be some built-in asyn request/response mechanism for ports, in the style of the Http module where you specify a Msg for the response. This would work for synchronous stuff too.

1 comments

For years and years people have been asking for "task ports" which would facilitate synchronous but safe js interop.

As far as I can tell the only reason Evan doesn't include something like task ports is to purposely make interop less convenient (but no more safe) than it needs to be, in order to encourage people to write elm. However, I think this decision will end up biting him at the end of the day.