Clear answer to the question of native modules in 0.19 and beyond

As others have, I also saw this reddit post - and I still can’t find a clear answer.

Some people on elm-dev say you can still use native (Javascript) modules in your own code you just can’t publish it to the Elm ecosystem, which I totally understand.

Others have said you’ll need to name your module/package a certain way, or that the interface is going to continue to be unofficial - again no problem.

However, this commit from Evan ( ) says the ability to write native modules is going to go away completely at some point, and I can’t find a clear answer to what is meant by this.

I could post the details of my needs for native code, but that would obscure my question, and I would still have this question if I had no immediate need. (I have enough experience of functional programming languages to know that sometimes the need comes up, and do not want to rely on a language that might push me into a corner I cannot get out of).

1 Like

I think things are far enough along with development to do a post like “expect these breaking changes with 0.19” to help folks get a head start (even though this post would precede a public alpha by quite some time). I will work on writing something like that up in a way that is most helpful and productive, and share it on discourse.

Some readers are probably wondering “Why not do it earlier though?!” I want to address that:

In general, I hesitate to post “probably X” because I do not want people to spend time inefficiently. First, if I express any uncertainty, people interpret that as an invitation for an online debate of extreme views. I think this is not overall productive because it is very rarely a representative sample of Elm users participating. I prefer to get feedback in structured ways (watching folks use Elm, asking specific questions, getting feedback from people whose design sensibilities I trust and have relied upon for years, etc.) Second, If people interpret a question as a final decision (which people do) they end up spending time changing things that may not be necessary, worrying about the implications, etc.

My point is just that the cost of communicating “this is a work in progress” in a very specific way is actually quite high to the community overall, and I try to account for that in my behavior. And if a “probably X” becomes “actually probably Y” now people are angry in a new way (that we do not have so much of because I avoid it intentionally.)

But like I said in the other part of this post, I think things are far enough along that I can put together a useful list of changes. So the answer is “give me some time to give a really nice answer”. I don’t know if there’s more to say past that until that list exists, so I’m going to close this thread.