Greeting, and a happy new year to all the readers of this thread;

The terms ‘let’ and ‘where’ are kinda widely understood among the *general 
public*, in Canada at least. The two terms are introduced in elementary school 
mathematics simultaneously with variables — I think grade three.

A simple google search for "let and where in mathematical notation” will give 
you plenty of hits.

For example (just search for the words ‘where’ and ‘let’):

* http://web.cs.ucdavis.edu/~amenta/w10/writingman.pdf "A Guide to Writing 
Mathematics”

* http://www.learningideas.me.uk/clearmaths/ "How to write mathematics clearly"

And on and on.

This is not some kind of highly specialised jargony thing, it a common usage.

Nor is this some legalistic setting where [oops, inadvertent use of the word] 
“‘where’ like in Haskell” means “‘where’ precisely and exactly as in Haskell” 
and not “‘where’, sorta like in Haskell but not necessarily exactly like and I 
don’t have either the time nor (I thought) the need to be totally precise in 
this informal discussion especially since there’s no clear evidence that it 
won’t be a total waste of my time to be so precise”.

[Colin, your energy displayed in your December 31 post 
https://groups.google.com/d/msg/elm-discuss/KiKF6K9gBKU/jzMuSTZmEwAJ is amazing]

Nobody is asking for rocket science. There is no evidence, and I find it hard 
to believe that any will ever be produced, that there’s anything special about 
(an english speaking) JavaScript programmer that makes comprehension of ‘where’ 
difficult.

If anyone’s interested in anecdotal evidence, I can tell you my experience as a 
40+ year professional programmer upon discovering the ‘where’ clause in 
Haskell. And the tick in variable names. And the backtick for infix notation. 
But I’m clearly not in Elm’s target demographic. So I won’t.

Cheers,
Bob

> On Jan 2, 2017, at 2:07 AM, Janis Voigtländer <[email protected]> 
> wrote:
> 
> It’s how they are implemented in Haskell, and people asking for where in Elm 
> typically do so by saying “we want where like in Haskell”. One could probably 
> come up with new parsing rules that allow where to be used anywhere in an 
> expression, thus also for example for local bindings inside a 
> lambda-abstraction. But that would require new design work to make sure 
> everything fits together and the syntax remains unambigous and usable. That 
> probably presents an even bigger hurdle for acceptance into Elm than “just” 
> wanting to get Haskell-style where in.
> 
> 
> 2017-01-02 5:57 GMT+01:00 David Andrews <[email protected]>:
> Is there something fundamental about `where` clauses which would prevent them 
> from parsing as expressions, or is this an artifact of how they are 
> implemented in Haskell?
> 
> On Sun, Jan 1, 2017 at 9:21 PM Janis Voigtländer 
> <[email protected]> wrote:
> 
> 
> Janis, the following compiles for me: …
> 
> 
> 
> Right, where does not work for expressions, but for right-hand sides, of 
> which pattern match branches are an instance.
> 
> 
> 
> The next question would be, still under the assumption that a choice has to 
> be made between where and let because both won’t be made available at the 
> same time, how well “where-only” would work if in addition one wants to have 
> a local binding that spans all pattern match branches, i.e., something one 
> would currently write in Elm like so:
> 
> 
> 
> f tree =
> 
>   let
> 
>     a = ... something ...
> 
>   in
> 
>     case tree of
> 
>       Leaf x -> let b = ... in ... using a and b ...
> 
>       Node s t -> let c = ... in ... using a and c ...
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> 
> 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 [email protected].
> 
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to