2 ms·
Those links you provided seem to have nothing to do with "whitelist of projects allowed to use native code". Can you be more specific about what you're referrin
by brabel 3y ago
Those links you provided seem to have nothing to do with "whitelist of projects allowed to use native code". Can you be more specific about what you're referring to?
- deleted 3y ago[deleted]
- josephcsible 3y agoThe articles linked by each of those posts contain numerous references to "native modules" and "kernel code". In this context, those things mean the ability to call back into JavaScript from Elm. The ability to do this exists in Elm, but it's locked down so you can't use it.
- Skinney 3y agoTo be fair: you can definitely call JS from Elm/Gren using ports, which exposes the JS world as an async service you can call. This seperation means you lose none of the guarantees of the language, while being able to communicate with the outside world. Kernel code is completely unprotected, and would allow mutations, exceptions and side-effects in "Elm world". The main problem with ports is that (1) it's an async API, which can be awkward for certain operations and (2) you cannot define a package that contains ports.