--
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.
A function called
State.runState
is redundant and silly. More importantly, it encourages people to useimport State exposing (..)
which does not scale well. In files with many so-called "unqualified" dependencies, it is essentially impossible to figure out where functions are coming from. This can make large code bases impossible to understand, especially if custom infix operators are used as well. Repeating the module name actively encourages this kind of unreadable code.
With a name like
State.run
the user is encouraged to disambiguate functions with namespacing, leading to a codebase that will be clearer to people reading the project for the first time.
> import Data.Integer
import Data.Integer
x = toString y
import Data.Integer exposing (..)
x = toString y
> import Data.Integer exposing (..)
> x = toString (Data.Integer.fromInt 1)
-- NAMING ERROR ---------------------------------------------- repl-temp-000.elm
This usage of variable `toString` is ambiguous.
6| x = toString (Data.Integer.fromInt 1)
^^^^^^^^
Maybe you want one of the following?
Basics.toString
Data.Integer.toString