I really like the change (getting rid of an exceptional syntax), but what's
more important is how other things adapts: see the example provided by Joey:
>For example, if you want the range [0 .. n] for n in [0 .. k]:
>
> Old syntax:
>   map (\x -> [0 .. x]) [0 .. k]
> New syntax:
>   map (Range 0) (Range 0 k)

OK, it's just very simple piece of code, imagine something more
sophisticated… You can partially apply a function, but not the range
syntax. In functional languages like Elm, the more you have is nothing but
a normal function the better, other "building" blocks just get in the way.

Regards,
Witold Szczerba


On Tue, Nov 15, 2016 at 11:59 AM, 'Andrew Radford' via Elm Discuss <
[email protected]> wrote:

> Lists are pretty core, I don't really have a problem with short expressive
> syntax that reads well. 'Well' meaning closer to reading like English. i.e
> I'd never say "I'll drink Bourbon on the range of days from 1 to 3, then
> Scotch on the days that range from day 4 to day 7". No way, it's just
> "Bourbon on days 1-3, Scotch on days 4-7". In other words, when you declare
> a range, the more interesting and important thing you are trying to express
> is what you are doing *with* that range - i.e. what I'm drinking, the
> 'List.Range' clutter waters that down as noise in a lot of cases.
>
> I can see this is probably a 50/50 among users - so although I personally
> will miss it a little bit, I can see how the decision to make it easier for
> newcomers to the language to get started would tip the balance in favor of
> List.Range. After all, 'Lets be mainstream' effectively means 'Let's
> convert people who currently just use JS' so this call must be in pursuit
> of increasing the 'conversion ratio'
>
>
>
>
> On Monday, 14 November 2016 23:14:58 UTC, Joey Eremondi wrote:
>>
>> It's also worth mentioning that adding syntax for something usually
>> indicates that it's a "core" feature.
>>
>> In C-like languages, looping from integers in a range is the key
>> iteration structure. But in Elm, fold and map are much more important. So
>> having special syntax could give beginners the idea that [..] is a primary
>> iteration tool, when it actually comes up in relatively few cases.
>>
>> On Mon, Nov 14, 2016 at 3:13 PM, Francesco Orsenigo <
>> [email protected]> wrote:
>>
>>> Yup.
>>> It is just not used often enough to warrant special syntax.
>>>
>>> On Tue, Nov 15, 2016 at 10:09 AM, Witold Szczerba
>>> <[email protected]> wrote:
>>> > I think List.range is just fine. No need for special syntax and strange
>>> > function names like ".." (hard to browse, find online, etc.).
>>> >
>>> > On Mon, Nov 14, 2016 at 10:29 PM, أحمد حبنكة <[email protected]>
>>> > wrote:
>>> >>
>>> >> What do you think about my suggestion in previous reply ? replacing
>>> >> List.range with List.(..) operator ?
>>> >>
>>> >>
>>> >> بتاريخ الاثنين، 14 نوفمبر، 2016 2:43:49 ص UTC+2، كتب Max Goldstein:
>>> >>>
>>> >>> Sometimes it's useful to pass arguments to List.range and have it be
>>> >>> empty when a > b.
>>> >>>
>>> >>> Perhaps there should be List.rangeWithStep 5 1 -1 to solve your
>>> problem.
>>> >>
>>> >> --
>>> >> 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 a topic in the
>>> > Google Groups "Elm Discuss" group.
>>> > To unsubscribe from this topic, visit
>>> > https://groups.google.com/d/topic/elm-discuss/z8t8u2f3iWk/unsubscribe.
>>> > To unsubscribe from this group and all its topics, 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