Jason Grout wrote: > Alex Ghitza wrote: >> On Thu, Mar 12, 2009 at 2:03 PM, Jason Grout >> <jason-s...@creativetrax.com <mailto:jason-s...@creativetrax.com>> wrote: >> >> >> seber...@spawar.navy.mil <mailto:seber...@spawar.navy.mil> wrote: >> > Carl >> > >> > Mathematica seems to have been successful with this approach. I'm >> > curious what were the reasons for its disapproval. Perhaps it was >> > feared it was error prone? >> >> >> Along with the other reasons people are giving, it may be helpful to >> remember that it is may be less error-prone in MMA. For example, >> parentheses in Sage can denote function calling as well as grouping, >> while they only denote grouping in MMA. With implicit multiplication, >> func (x) and func(x) are both valid in Sage, but have different >> meanings. In MMA, they both are multiplication, like you'd expect from >> math. >> >> >> ??? so you're saying that in Mathematica sin(x) means sin times x? >> That's not what I'd expect from math... >> >> I must be misreading what you wrote. >> > > Nope, you're correct. That's a nice thing about Mathematica. Function > calls are always with square brackets, parentheses are purely a grouping > construct. Curly braces are always lists, and double square brackets > are indexing (but that's just syntactical sugar). System functions > always use camel-case. I really like the consistency in mathematica; it > makes it easy to learn and predictable. >
Nevertheless I *hate* the Mathematica syntax! See my rant from long ago: Why Mathematica is not my language of choice! An example from the OEIS I happened to see today: %t A055254 A055254[N_] := Count[ #, True] & /@ Map[OddQ, IntegerDigits /@ (2^# & /@ Range[N])] (This generates a table of the number of odd digits in the first N powers of two.) - Douglas Skinner (skinnerd(AT)comcast.net), Dec 06 2007 (how easy to learn and remember) versus %o A055254 (PARI) a(n)=sum(k=1,ceil(log(2^n+1)/log(10)),floor(2^n/10^(k-1))%2) (Benoit Cloitre, Feb 10 2006) Not to speak how easy it will look in pure sage! Cheers, Jaap > So your example would be Sin[x] in MMA. > > Jason > > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---