Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The 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.


To 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: