Re: evaluate to True?
- To: mathgroup at smc.vnet.net
- Subject: [mg125948] Re: evaluate to True?
- From: A Retey <awnl at gmx-topmail.de>
- Date: Mon, 9 Apr 2012 05:32:34 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201204061001.GAA23045@smc.vnet.net> <CAEtRDSfexgBvoLTpXVPv=6B7m_CsNwqhUAWQBvnj4JMimsN-Sg@mail.gmail.com> <jlp3c2$17v$1@smc.vnet.net>
Hi, > The misinterpretation of the function due to the name can be the cause > of severe bugs as seen > in message . Maybe a name like MatchQ would be more > appropriate for future versions > of Mathematica. MatchQ already exists and does something slightly different. And MemberQ has been existing for many versions and probably will never be changed -- too much existing code would be broken. I don't think that the name is problematic at all as there are many functions in Mathematica that use patterns in a similar way (e.g. Position, Cases, Collect...), so it doesn't really come as a surprise that MemberQ behaves as it does. By using patterns these functions become a lot more powerful so many users wouldn't see such a limitation as an advantage... albert
- References:
- Why does ModuleQ[{0,1,2}, expr_] evaluate to True?
- From: Christoph Lhotka <christoph.lhotka@fundp.ac.be>
- Why does ModuleQ[{0,1,2}, expr_] evaluate to True?