Re: flatmap considered harmful?

2017-07-29 Thread Sean McAfee
On Thu, Jul 27, 2017 at 12:43 PM, Will Coleda  wrote:

> I agree, that seems like pointless editorializing.
>
> If you can open a ticket at perl6/doc/issues on github, I'll remove
> that sentence this evening. (or someone can beat me to it.)
>
>
OK, it's done:

https://github.com/perl6/doc/issues/1428

Thanks!


Re: flatmap considered harmful?

2017-07-27 Thread Will Coleda
I agree, that seems like pointless editorializing.

If you can open a ticket at perl6/doc/issues on github, I'll remove
that sentence this evening. (or someone can beat me to it.)

On Thu, Jul 27, 2017 at 2:39 PM, Sean McAfee  wrote:
> While browsing the Perl 6 docs recently, here:
>
> https://docs.perl6.org/type/List#method_flatmap
>
> I noticed this paragraph for the first time:
>
>> It is considered bad practice to use flatmap. Instead of .flatmap( ),
>> please use .map( ).flat as it is clear when the .flat is called and is not
>> confusing like .flatmap.
>
>
> To quote a certain president's lawyer:  Says who?
>
> Flat-mapping is awesome; I've written code that does it in several different
> programming languages, in none of which is it deprecated in this way.  Is
> there really any reason to avoid it in Perl 6 other than subjective notions
> of how confusing it is?
>



-- 
Will "Coke" Coleda


flatmap considered harmful?

2017-07-27 Thread Sean McAfee
While browsing the Perl 6 docs recently, here:

https://docs.perl6.org/type/List#method_flatmap

I noticed this paragraph for the first time:

It is considered *bad practice* to use flatmap. Instead of .flatmap( ),
> please use .map( ).flat as it is clear when the .flat is called and is
> not confusing like .flatmap.
>

To quote a certain president's lawyer:  Says who?

Flat-mapping is awesome; I've written code that does it in several
different programming languages, in none of which is it deprecated in this
way.  Is there really any reason to avoid it in Perl 6 other than
subjective notions of how confusing it is?