On Tuesday, January 17, 2017 at 4:27:36 PM UTC, OvermindDL1 wrote:
>
> On Tuesday, January 17, 2017 at 4:25:08 AM UTC-7, Rupert Smith wrote:
>
>> An alternative might be to re-write the Native modules in the Elm core in 
>> OCaml. There isn't a huge amount of it.
>>
>
> Precisely this, I've already done quite a large chunk of it as a test and 
> it translates very easily (and becomes type safe, which Elm's is not as 
> I've hit 'undefined's in pure elm code before (already in the bug tracker, 
> but why did they happen at all?!)).  I kept it identical to the Elm API as 
> well, though if I broke Elm's API in a couple of minor ways then I could 
> *substantially* reduce the number of allocations done...  But yes, I've 
> rewrote most of Elm's native Core code as well as some third-party 
> libraries like navigation, all without a touch of javascript and all of it 
> type safe the whole way, mostly playing around but we ended up using a lot 
> of it at work anyway (I still need to get around to cleaning it up and 
> releasing it...).
>

In my view, this also provides very good justification for not allowing 
native code into packages.elm-lang.org. Porting Elm to another platform in 
this way is manageable.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to