MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Product

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87595] Re: [mg87558] Re: Product
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 14 Apr 2008 05:42:09 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <ftmtsj$4lf$1@smc.vnet.net> <200804110956.FAA08319@smc.vnet.net> <ftq5gc$n1$1@smc.vnet.net> <200804130730.DAA11379@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Sorry about my typo "@" instead of "@@".

Yes, of course that's what I was referring to: including a special,
additional function that does what a special case of a more general
construct.

But simplicity and elegance of the language is only one design
consideration.  Another is usability.  I can see someone coming to
Mathematica who, among other things, just wants to get some computations =

done that involve adding up a list of numbers, who would prefer to be
able to use a single function Total rather than the combination of Plus
and Apply.

Szabolcs Horv=E1t wrote:
> Murray Eisenberg wrote:
>> But of course Total is also redundant!  Plus @ {1,2,3,4}
>>
>> So the issue is one of language design: when does a particular case of=
 a
>> more general construction occur so frequently that a special function
>> should be introduced for it.
>
> ...Personally I think that the *syntax* Total[list] provides nothing ov=
er
> Plus @@ list, so just because summation is a common operation, a new
> syntax should not be introduced for it.  In fact I would consider the
> introduction of too many redundant constructs bad language design.

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • References:
    • Re: Product
      • From: Szabolcs Horvát <szhorvat@gmail.com>
    • Re: Product
      • From: Szabolcs Horvát <szhorvat@gmail.com>
  • Prev by Date: Re: List concatenation speed
  • Next by Date: Parallel Computing Toolkit with ssh tunnels
  • Previous by thread: Re: Product
  • Next by thread: Re: Product