purescript-halogen / purescript-halogen

A declarative, type-safe UI library for PureScript.
https://purescript-halogen.github.io/purescript-halogen/
Apache License 2.0
1.52k stars 217 forks source link

Rename Halogen.VDom.Driver runUI #769

Open flip111 opened 3 years ago

flip111 commented 3 years ago

I find it pretty confusing that these two functions have the same name

Could for the next major release this be a breaking change to rename this function to something else? VDom has meaning in the context of UI but UI has no meaning in the context of VDom. Since the module name is already specified to VDom it is then logical that it doesn't contain something named with UI.

ocramz commented 2 years ago

At the very least, there should be docstrings on the two runUIs. Currently it's a bit hard to tell where you need which, unless you are copy-pasting code from a tutorial (like I am) therefore defaulting to the runUI from VDom.Driver

thomashoneyman commented 2 years ago

I'd be happy to accept a PR adding docstrings to these two functions, and I'm tentatively open to renaming the Aff.Driver.runUI function as I doubt it's much-used outside of packages like halogen-hooks. But I'd rather not force every Halogen user to fix their app by renaming VDom.Driver.runUI.