3 ms·
I am not saying that everything is going to be super easy to do this way but taking away my ability of using Math.PI because of document.getElementById is silly
by StreamBright 8y ago
I am not saying that everything is going to be super easy to do this way but taking away my ability of using Math.PI because of document.getElementById is silly.
- yakshaving_jgt 8y agoNo, it is not silly. It is referential transparency.
- the_gipsy 8y agoIf you absolutely must run unsafe JS interop inline then maybe Elm is not for you, but it doesn't make its approach "silly". You can run absolutely any JS code, just through the ports API. Trivial things like Math.PI are in the core[1] or some package. [1] https://package.elm-lang.org/packages/elm-lang/core/5.1.1/Basics#pi https://package.elm-lang.org/packages/elm-lang/core/5.1.1/Ba...
- StreamBright 8y agoAgain, I could not care less what is in core (which might not be there anymore without a deprecation warning) but I want to use JS functions if I need to. How hard is to understand these requirements?
- the_gipsy 8y agoAs I said, yoy can use any JS function with Elm. It’s just through ports, not inline.