Re: Mathematica and Lisp
- To: mathgroup at smc.vnet.net
- Subject: [mg120049] Re: Mathematica and Lisp
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Wed, 6 Mar 2013 06:04:51 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <kgse4s$jam$1@smc.vnet.net> <20130303072215.D75466867@smc.vnet.net> <CAEtRDSdZ37Q7yCggT8AGWkKncfF57V57Et5JxjQ6i1yBnSVePQ@mail.gmail.com> <kh163q$sa3$1@smc.vnet.net> <kh4d4r$70k$1@smc.vnet.net> <kh6c93$b26$1@smc.vnet.net>
On 06/03/2013 03:13, Richard Fateman wrote: > On 3/5/2013 1:16 AM, David Bailey wrote: > <snip> >> >> It is important to realise that anyone can understand any expression >> involving operators by using Hold and FullForm: >> >> (f @@@ g) // Hold // FullForm >> >> Hold[Apply[f,g,List[1]]] > > I, of course, would suggest that one NOT use > (f@@@g)//Hold//FullForm > > but > > FullForm[Hold[f@@@g]] > > 1. My form is clearer, not using any additional mysterious-to-the-novice > infix operations like //. > > 2. It is even shorter, using 2 fewer characters, as written. > > 3. It apparently requires less thought, because even you were, at least > for the moment, unsure of the precedence of // and so you inserted the > entirely unnecessary () around f@@g. Yes, I never use @@@, and convert it to an equivalent whenever I encounter it - but it is there for those that like it. > > 4. There is really no question of the precedence in my form. > So perhaps we should extend your principle to maths itself? Why risk students getting confused about the meaning of a + b c + d or f(a+b)- better to teach students to use a notation equivalent to FullForm! This principle would be even more useful when they got to calculus, where notations like dy/dx and integrals are hopelessly ambiguous in that the terminating dx looks superficially as if it could commute with the integrand! These notations probably often encourage students to perform invalid manipulations - but even so, most people value them! I guess Mathematicians themselves realised why operator notation is so useful a long time back. It reduces the clutter and helps people to concentrate on what matters. Ultimately the choice between FullForm and operator form is a psychological question - not a math or computer science one. Those of us who do a lot of programming, also value operators that assist with that task too. The Mathematica language offers users a lot of choice - which you seem to abhor because some people don't choose to use it your way! David Bailey http://www.dbaileyconsultancy.co.uk
- References:
- Re: Mathematica and Lisp
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Re: Mathematica and Lisp