Haskell Foldable Wats
Chris Allen
cma at bitemyapp.com
Wed Feb 24 16:14:59 UTC 2016
Aren't these sorts of mistakes impossible with ML sigs and structs?
On 02/24/2016 10:08 AM, Augustsson, Lennart wrote:
>
> Having length of a tuple not be a type error is not only confusing for
> beginners.
>
> It can also mask bugs in real code written by experts. And it’s
> already happened.
>
> Since length of a tuple returning 1 is nonsensical and useless, it
> should simply not be legal.
>
> *From:*Libraries [mailto:libraries-bounces at haskell.org] *On Behalf Of
> *Nathan Bouscal
> *Sent:* 24 February 2016 15:56
> *To:* Kosyrev Serge
> *Cc:* Haskell Libraries
> *Subject:* Re: Haskell Foldable Wats
>
> On Wed, Feb 24, 2016 at 3:49 PM, Kosyrev Serge
> <_deepfire at feelingofgreen.ru <mailto:_deepfire at feelingofgreen.ru>> wrote:
>
> Nathan Bouscal <nbouscal at gmail.com <mailto:nbouscal at gmail.com>> writes:
> > Apologies for being unclear. By marginal, I meant that I expect many
> > learners who end up confused by this would have otherwise come across
> > the same confusion by other paths.
>
> This sounds odd to me in two ways:
>
> 1. it is not "the same" confusion -- it is a worse confusion, for
> several reasons:
> - the questionable Functor instance gives a cognitive dissonance for
> not transforming the entirety of the tuple (for good reasons, but
> still!)
> - the questionable Functor is a puzzlingly arbitrary choice among a
> N-family of options that an N-tuple provides.
>
> As Ed pointed out, there is nothing arbitrary about the choice. This
> actually makes tuples in some sense a uniquely good way of explaining
> how things work, because you can show why this restriction exists.
>
> 2. but even if the confusion itself wasn't made worse -- its
> impact has
> increased, because exposure to it has increased
>
> To the extent that exposure has increased, I would think it would be
> caused by confusion of the "lists vs tuples" type, which seems
> important to resolve early. That resolution doesn't really need to say
> anything about how Functor works, and can instead be more along the
> lines of "What problem were you trying to solve by taking the length
> of a tuple? Should you have been using a list instead?"
>
> --
> с уважениeм / respectfully,
> Косырев Сергей
>
>
> This email and any attachments are confidential and may also be
> privileged. If you are not the intended recipient, please delete all
> copies and notify the sender immediately. You may wish to refer to the
> incorporation details of Standard Chartered PLC, Standard Chartered
> Bank and their subsidiaries at
> http://www.standardchartered.com/en/incorporation-details.html
>
> Insofar as this communication contains any market commentary, the
> market commentary has been prepared by sales and/or trading desk of
> Standard Chartered Bank or its affiliate. It is not and does not
> constitute research material, independent research, recommendation or
> financial advice. Any market commentary is for information purpose
> only and shall not be relied for any other purpose, and is subject to
> the relevant disclaimers available at
> http://wholesalebanking.standardchartered.com/en/utility/Pages/d-mkt.aspx
>
> Insofar as this e-mail contains the term sheet for a proposed
> transaction, by responding affirmatively to this e-mail, you agree
> that you have understood the terms and conditions in the attached term
> sheet and evaluated the merits and risks of the transaction. We may at
> times also request you to sign on the term sheet to acknowledge in
> respect of the same.
>
> Please visit
> http://wholesalebanking.standardchartered.com/en/capabilities/financialmarkets/Pages/doddfrankdisclosures.aspx
> for important information with respect to derivative products.
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160224/c8459bc2/attachment.html>
More information about the Libraries
mailing list