The problem with the escape hatch idea is that it breaks pretty much of all
elm's promises. So for the 0.5% of cases where speed is the most important
factor I don't want to see us break the purity and guarantees of the rest
of the language.

Zach
ᐧ

On Wed, Dec 28, 2016 at 10:33 AM, Peter Damoc <pda...@gmail.com> wrote:

>
>
> On Wed, Dec 28, 2016 at 9:06 AM, Mark Hamburg <mhamburg...@gmail.com>
> wrote:
>
>> Just to make it clear, I'm not particularly calling for an easier way to
>> create "subscriptions". I'm calling for a way to do one of the following —
>> either is fine, each have their pluses and minuses:
>>
>> 1. Expose a synchronous, externally defined function that takes JSON (or
>> really anything a command port supports) in and returns JSON (or really
>> anything a subscription port supports) out.
>> - or -
>> 2. Expose a factory for externally defined asynchronous tasks where the
>> task when executed receives JSON (etc) in and resolves to JSON (etc) when
>> finished.
>>
>
> 1. would break the purity guarantee.
>
> 2. this looks like the mechanism for scheduling messages. In short, if one
> could schedule a message to be delivered after the execution of some JS
> function, one could accomplish what you want.
>
> I'm not familiar with how difficult would be to expose this functionality
> in the ports world. The functionality exists in the Native layer as one can
> see in the Native implementation of Time.now but exposing it in a safe and
> easy way through the ports API might not be trivial.
>
>
>
>
>
> --
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Zach Kessin
SquareTarget <http://squaretarget.rocks?utm_source=email-sig>
Twitter: @zkessin <https://twitter.com/zkessin>
Skype: zachkessin

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to