elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
173 stars 17 forks source link

Debug.log with one argument should maybe emit a warning that it won't execute the side effect #224

Open MainShayne233 opened 7 years ago

MainShayne233 commented 7 years ago

When some does something like:

let
    _ = Debug.log "Hello Elm!"
in
    ...

They might expect that either they will side effect of "Hello Elm!" showing up in their browser console, or that it would throw a compiler error/warning, but nothing happens at all.

Not sure what the best solution for this is, or if one is even warranted, but I, an Elm beginner, spent an trying to figure out what was wrong, and definitely would have appreciated some sort of warning.