MathGroup Archive 2008

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

Search the Archive

Re: Re: Product


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



  • 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