As a poster from the original thread on Github, I encourage anyone on here
who hasn't read it in its entirety to do so. The "pro-where" camp is not
just Haskell whiners, we have legitimate issues with "let".
On Friday, 30 December 2016 09:10:52 UTC-8, Will White wrote:
>
> Continued from https:/
*On `where`*
History: This debate is on-going since May 2014.
The aggregate claim: `where` clauses are superior to `let-in` both
technically
and aesthetically. It was a mistake from the beginning to choose `let` over
`where`. They should, at the very least, coexist.
Below I've summarized argume
To drop `let` or not would be decided after a call on `where` has been
made. Personally I don't like `let` and think it's always wrong (or at
least ugly) to use it, but there is a clear compromise here where it can
stay put. That said, as Elm is not yet 1.0, there is no obligation not to
break
> it is counterproductive to not up front discuss the actual alternatives
While I think `let` is always an anti-pattern, I don't think it needs to be
removed if there is support for it. The "there must only be one way"
argument is moot so long so long as the points raised above are left
unaddre
Happy new year, everyone.
Janis, the following compiles for me:
zing :: Num t => [t] -> t
zing list = case list of
[] -> a
where a = 1
a:as -> b
where b = a + 1
Max, you may have jumped to a conclusion. From my point of view, the
discussion (at least on the mailing list) has barely
@Janis, I suppose the `where` version of that formation would have to be:
f tree = work
where a = ...
work = case tree of
Leaf x -> -- using a and b
where b = ...
Node s t -> -- using a
@Janis, no, truth be told I didn't like it as I was writing it, but it also
didn't occur to me at the time to fire `where` down at the bottom like
that. Doing so would satisfy "intent first", but I'd say `let` and `where`
here would be tied in terms of "zig-zag annoyance", which is a natural
ou
@Bob H & @Andrew R: Thank you.
@Janis: It's likely that we could continue to produce extensions/refactors
to each other's examples for eternity (which isn't a bad thing, I don't
think this is a waste of time at all). In the case of such a `munge` in
your example, yeah, following a "factor out c