Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-26 Thread James Hamilton
That is a fair point, actually. I think the idea of aliasing the functions 
on 0.18 might be a good temporary measure which would allow the community 
to get used to the new function names without breaking any code and then 
the old ones can be removed in a later version. 

On Tuesday, October 25, 2016 at 2:56:16 PM UTC+1, Robin Heggelund Hansen 
wrote:
>
> I did a lot of work in ember myself, and I feel your pain, but this is 
> still a 0.x product, and so it should be expected that some breakage is 
> performed while we reach the best possible state of the language. It's 
> different for Ember, which had a lot of breakage post 1.0.
>
> tirsdag 25. oktober 2016 14.45.35 UTC+2 skrev James Hamilton følgende:
>>
>> I agree with your sentiment in principle. I suppose the underlying 
>>> question is whether or not this is actually going to be such a benefit to 
>>> future users of elm that it would be worth inconveniencing current users 
>>> who want to upgrade. Personally I'm quite comfortable with foldr and foldl 
>>> but I understand the foldLeft and foldRight are more expressive. 
>>>
>>
>> I used to use ember and its constant churn drove me to find an 
>> alternative which led me to elm. Not that the community elm behaves 
>> anything like ember in this regard, but still this blog post 
>> 
>>  rather 
>> sums up the danger of making a lot of inconvenient changes for apparently 
>> abstract reasons. 
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Sham Beam
Does Elm have a deprecated keyword? It could ease the transition if 
renaming does happen.



On 26/10/2016 12:56 AM, Robin Heggelund Hansen wrote:

I did a lot of work in ember myself, and I feel your pain, but this is
still a 0.x product, and so it should be expected that some breakage is
performed while we reach the best possible state of the language. It's
different for Ember, which had a lot of breakage post 1.0.

tirsdag 25. oktober 2016 14.45.35 UTC+2 skrev James Hamilton følgende:

I agree with your sentiment in principle. I suppose the
underlying question is whether or not this is actually going to
be such a benefit to future users of elm that it would be worth
inconveniencing current users who want to upgrade. Personally
I'm quite comfortable with foldr and foldl but I understand the
foldLeft and foldRight are more expressive.


I used to use ember and its constant churn drove me to find an
alternative which led me to elm. Not that the community elm behaves
anything like ember in this regard, but still this blog post


 rather
sums up the danger of making a lot of inconvenient changes for
apparently abstract reasons.

--
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+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--
Sham Beam


--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Juan Soto
I'm an observer (not an Elm programmer) but these discussions are 
interesting to me. I guess the question Elm programmers have to ask 
themselves is what Elm's purpose is? Haskell/traditional Functional ML 
language in the browser? PureScript fits that mold already, but if so the 
recent changes and this one go against that. A functional ML language aimed 
at the general population? Then I agree with the changes for readability, 
though to be honest `foldr` and `foldRight` are pretty close so I'd opts 
for an alias until 1.0.0.

On Tuesday, October 25, 2016 at 12:18:00 PM UTC-4, Robin Heggelund Hansen 
wrote:
>
> Once, that I remember, after a refactoring. But this is more to do with 
> the ease of reading code. I've several times seen foldr and read foldl. In 
> general, I find names that differ by only a single letter a bad thing. Like 
> wether and whether. Sure, now that i've pointed out that there is a 
> difference here, it's easy enough to point it out. But given the proper 
> context it can be easy to confuse one with the other, especially when the 
> compiler (or the spell checker) don't point it out for you.
>
> tirsdag 25. oktober 2016 17.36.02 UTC+2 skrev Rupert Smith følgende:
>>
>> On Tuesday, October 25, 2016 at 1:45:35 PM UTC+1, James Hamilton wrote:
>>>
>>> I agree with your sentiment in principle. I suppose the underlying 
 question is whether or not this is actually going to be such a benefit to 
 future users of elm that it would be worth inconveniencing current users 
 who want to upgrade. Personally I'm quite comfortable with foldr and foldl 
 but I understand the foldLeft and foldRight are more expressive. 

>>>
>>> I used to use ember and its constant churn drove me to find an 
>>> alternative which led me to elm. Not that the community elm behaves 
>>> anything like ember in this regard, but still this blog post 
>>> 
>>>  rather 
>>> sums up the danger of making a lot of inconvenient changes for apparently 
>>> abstract reasons. 
>>>
>>
>> Also, have you ever actually encountered a bug which was caused by 
>> misreading foldl for foldr or the other way around? I really don't find it 
>> hard to tell them apart. 
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Robin Heggelund Hansen
Once, that I remember, after a refactoring. But this is more to do with the 
ease of reading code. I've several times seen foldr and read foldl. In 
general, I find names that differ by only a single letter a bad thing. Like 
wether and whether. Sure, now that i've pointed out that there is a 
difference here, it's easy enough to point it out. But given the proper 
context it can be easy to confuse one with the other, especially when the 
compiler (or the spell checker) don't point it out for you.

tirsdag 25. oktober 2016 17.36.02 UTC+2 skrev Rupert Smith følgende:
>
> On Tuesday, October 25, 2016 at 1:45:35 PM UTC+1, James Hamilton wrote:
>>
>> I agree with your sentiment in principle. I suppose the underlying 
>>> question is whether or not this is actually going to be such a benefit to 
>>> future users of elm that it would be worth inconveniencing current users 
>>> who want to upgrade. Personally I'm quite comfortable with foldr and foldl 
>>> but I understand the foldLeft and foldRight are more expressive. 
>>>
>>
>> I used to use ember and its constant churn drove me to find an 
>> alternative which led me to elm. Not that the community elm behaves 
>> anything like ember in this regard, but still this blog post 
>> 
>>  rather 
>> sums up the danger of making a lot of inconvenient changes for apparently 
>> abstract reasons. 
>>
>
> Also, have you ever actually encountered a bug which was caused by 
> misreading foldl for foldr or the other way around? I really don't find it 
> hard to tell them apart. 
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, October 25, 2016 at 1:45:35 PM UTC+1, James Hamilton wrote:
>
> I agree with your sentiment in principle. I suppose the underlying 
>> question is whether or not this is actually going to be such a benefit to 
>> future users of elm that it would be worth inconveniencing current users 
>> who want to upgrade. Personally I'm quite comfortable with foldr and foldl 
>> but I understand the foldLeft and foldRight are more expressive. 
>>
>
> I used to use ember and its constant churn drove me to find an alternative 
> which led me to elm. Not that the community elm behaves anything like ember 
> in this regard, but still this blog post 
> 
>  rather 
> sums up the danger of making a lot of inconvenient changes for apparently 
> abstract reasons. 
>

Also, have you ever actually encountered a bug which was caused by 
misreading foldl for foldr or the other way around? I really don't find it 
hard to tell them apart. 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Robin Heggelund Hansen
I did a lot of work in ember myself, and I feel your pain, but this is 
still a 0.x product, and so it should be expected that some breakage is 
performed while we reach the best possible state of the language. It's 
different for Ember, which had a lot of breakage post 1.0.

tirsdag 25. oktober 2016 14.45.35 UTC+2 skrev James Hamilton følgende:
>
> I agree with your sentiment in principle. I suppose the underlying 
>> question is whether or not this is actually going to be such a benefit to 
>> future users of elm that it would be worth inconveniencing current users 
>> who want to upgrade. Personally I'm quite comfortable with foldr and foldl 
>> but I understand the foldLeft and foldRight are more expressive. 
>>
>
> I used to use ember and its constant churn drove me to find an alternative 
> which led me to elm. Not that the community elm behaves anything like ember 
> in this regard, but still this blog post 
> 
>  rather 
> sums up the danger of making a lot of inconvenient changes for apparently 
> abstract reasons. 
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread James Hamilton

>
> I agree with your sentiment in principle. I suppose the underlying 
> question is whether or not this is actually going to be such a benefit to 
> future users of elm that it would be worth inconveniencing current users 
> who want to upgrade. Personally I'm quite comfortable with foldr and foldl 
> but I understand the foldLeft and foldRight are more expressive. 
>

I used to use ember and its constant churn drove me to find an alternative 
which led me to elm. Not that the community elm behaves anything like ember 
in this regard, but still this blog post 

 rather 
sums up the danger of making a lot of inconvenient changes for apparently 
abstract reasons. 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread 'Andrew Radford' via Elm Discuss
As people pointed out - it's a BDFL call, but it feels to me that this is 
the closest candidate to the spirit of the recent 'Let's go mainstream' 
BDFL calls. 
(Assuming that foldRight is sufficiently less commonly used so as to not 
make the ample suffix 'Right' burdensome, and the lack of suffix for fold 
reasonable)

On Tuesday, 25 October 2016 10:48:30 UTC+1, Robin Heggelund Hansen wrote:
>
> fold and foldRight then?
>
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Robin Heggelund Hansen
fold and foldRight then?

tirsdag 25. oktober 2016 11.42.00 UTC+2 skrev Wouter In t Velt følgende:
>
> Op dinsdag 25 oktober 2016 02:20:29 UTC+2 schreef Max Goldstein:
>>
>> Changing things makes upgrading harder, invalidates old code, and gives 
>> the larger community the impression that Elm is not stable.
>>
>
> The question is whether different naming for "foldl" and "foldr" would 
> bring enough benefits to be worth all these (temporary) drawbacks.
> So:
>
>- "foldLeft" and "foldRight" are easier to keep apart/ more readable - 
>regardless of someone's previous language
>- "reduce" and ("foldr" or nothing or something else) would be more 
>familiar to people coming from JS (and possibly other languages too)
>
> My own background is JS, so "reduce" is familiar. 
> But at the same time, I use "foldl" way more often in Elm than I ever used 
> "reduce" in JS, and in very different ways.
>
> What I see as a structural drawback to "foldLeft" and "foldRight" is the 
> length of the function names: shorter names are better, and (for me at 
> least) the extra characters in the function names do not give me any 
> relevant info or benefits.
> 90% of the time I use any fold, my output is the same in both directions. 
> (like .sum or .maximum etcetera). 
> I have never used "foldr" (yet).
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Wouter In t Velt
Op dinsdag 25 oktober 2016 02:20:29 UTC+2 schreef Max Goldstein:
>
> Changing things makes upgrading harder, invalidates old code, and gives 
> the larger community the impression that Elm is not stable.
>

The question is whether different naming for "foldl" and "foldr" would 
bring enough benefits to be worth all these (temporary) drawbacks.
So:

   - "foldLeft" and "foldRight" are easier to keep apart/ more readable - 
   regardless of someone's previous language
   - "reduce" and ("foldr" or nothing or something else) would be more 
   familiar to people coming from JS (and possibly other languages too)

My own background is JS, so "reduce" is familiar. 
But at the same time, I use "foldl" way more often in Elm than I ever used 
"reduce" in JS, and in very different ways.

What I see as a structural drawback to "foldLeft" and "foldRight" is the 
length of the function names: shorter names are better, and (for me at 
least) the extra characters in the function names do not give me any 
relevant info or benefits.
90% of the time I use any fold, my output is the same in both directions. 
(like .sum or .maximum etcetera). 
I have never used "foldr" (yet).

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-25 Thread Peter Damoc
On Tue, Oct 25, 2016 at 3:20 AM, Max Goldstein 
wrote:

> It really comes down to what Evan wants to do. People come to Elm from
> many languages, and everyone has preferences. Changing things makes
> upgrading harder, invalidates old code, and gives the larger community the
> impression that Elm is not stable.


Old code is already invalid for other reasons and getting to a highly
polished 1.0 justifies the trouble that we, the innovators have to go
through.
Also, changes like these are mechanical and some kind of tooling could make
it very easy to upgrade a large codebase.

*reduce* has a lot of notoriety built into it due to MapReduce.

People frequently equate familiarity with good. :)



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread Max Goldstein
I would love more Ruby-like names across the board, except for the presence of 
aliases, but Elm grew out of Haskell so it carries some of that history. 

It really comes down to what Evan wants to do. People come to Elm from many 
languages, and everyone has preferences. Changing things makes upgrading 
harder, invalidates old code, and gives the larger community the impression 
that Elm is not stable. 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-24 Thread Brian Marick

> On Oct 20, 2016, at 9:12 AM, Robin Heggelund Hansen  
> wrote:
> 
> In Elm 0.18, primes are being removed as valid characters in a 
> variable/function name. 


That’s unfortunate. Non-alphabetical characters can be really useful for 
signaling intent.

For example, an ending  can usefully be a quick signal that the function is 
a boolean predicate. That’s less useful in a statically-typed language, but 
“less useful” is not the same thing as “useless”. 

Adding a prime mark has a long, even pre-computer, history of signaling.  
quickly tells the reader that the value is intimately bound up with  but has 
a contextually relevant difference. To be less abstract:

When working with SVG, it’s really awkward that `Svg.Attributes.x` takes a 
String argument, given that graphics often involves working with numeric 
values. So it’s not a horrible idea for graphics code to establish a convention 
that primed names take a (consistently, thus predictably) nonstandard type. 

I confidently predict that removing primes won’t result in `xInteger` 
definitions but rather `x2` - which I’d argue is less clear than x’

I could imagine libraries that said explicitly “In this library, functions 
doing  use the <‘> suffix, but functions doing  
use . (Neither Ruby nor Clojure are really consistent, but experienced users 
know roughly how to react to functions ending in .) Community pressure could 
help with that. 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Proposal: rename foldl til foldLeft and foldr to foldRight

2016-10-20 Thread Martin DeMello
I would be strongly opposed to renaming either foldl or foldr to just fold;
that always confuses me when languages do it.

martin

On Thu, Oct 20, 2016 at 8:32 AM, Max Goldstein 
wrote:

> Normally I'm opposed to syntax or name changes. But I think this or some
> variation is a good idea. (Maybe foldl becomes fold, since it's usually the
> one you want.)
>
> That said, it's all subject to Evan's approval.
>
> --
> 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+unsubscr...@googlegroups.com.
> 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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.