@mgold If you are suggesting that tedious to write elm code should be addressed by a distributed series of independent browser based online code generators, I'm going to say that's not a real solution. I don't want to go to a different set of browser bookmarks for different common derivable code scenarios. Nor do I want code generation outside of my build process.
If you are suggesting using things like json-to-elm inside of a build process, then we are potentially in some kind of module loader hell. json-to-elm looks like it uses python for generation, so now python is in the stack, and there is no consistent standard for how these distributed set of tools should work. If we wish to address 10+ boilerplate heavy scenarios, we now have to custom install and rig together disparate apis of these different generation tool into our build. And once all that is working, essentially we just invented fraken macros, where macro code is separate outside of .elm files.
A proper macro system seems like the only solution to me atm. That's not to say there is only one way of going about it.
One way that might address the "One Language" and maintainability concern, is to have macros that are outside of Elm. As in elm-make provides a facility to pipe code into an external process for expansion. Then type checks the expanded code. This could also mean that elm-package now needs the ability to let code generator authors package an executable with any surrounding elm files. I feel this could also discourage the abuse that can come from macros, as there are more barriers to set up the external code gen process and wire it in.
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
elm-package could require package names to be at a certain "distance" from one another
--
elm-package could require package names to be at a certain "distance" from one anotherThat still doesn't resolve the problem of running arbitrary code. If our community gets big enough that I don't know and trust every author from this mailing list, we need a way to stop people from being malicious.
--
or just editor plugins to generate that code for you. I don't think
they're compelling use cases for macros as part of Elm itself.
Yes, that would be nice Zinggi
--
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/im2up0f59qs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.
I'm worried that a macro system will let people get a bit "too creative" with their code and we'll end up with indecipherable stuff like injection-based HTTP servers with endpoints and parameter names magically deduced from function signatures. Like how Evan has said that the Elm Architecture "seems to emerge naturally in Elm", I think the current language structure does a great job of encouraging good design, and I'm worried that a macro system could hurt that.