On Mon, 31 Aug 2009, William Stein wrote: > On Mon, Aug 31, 2009 at 8:23 AM, rjf <fate...@gmail.com> wrote: > >> >> You can either >> (a) adhere to Python syntax. >> (b) adhere to Python except for a few changes that are so subtle that >> no one would even notice. >> (c) adhere to Python except for a few more changes that you tell >> everyone about and hope that the discrepancy between Sage and Python >> (and Cython) will not be noticed by critics, and so you can continue >> to claim "Sage is just Python and everyone knows and loves Python". >> (d) use Python as a base, and add whatever you want, because you now >> have your own "pre"parser and can add, say, postfix "!". And now you >> probably should tell your users that the Sage language is "python >> inspired". >> (e) use your own parser for your own made up language that looks like >> some mathematical notation. >> >> Maxima/Macsyma is in category (d) or (e): it uses its own parser for >> Algol 60 as a base and added things to it, but also has a syntax- >> extension feature so that the parser can be changed by the user. e.g. >> commands to add new post-fix operators etc. (At run-time). >> >> One of the premises and alleged great advantages of Sage was, I >> thought, that it is "just Python", and you seem to be casually tossing >> that idea into the trash. >> (The idea that the user-language and the implementation-language for a >> computer algebra system has been a topic for discussion at least since >> the early 1970s, so the idea that all those clever people just missed >> the boat -- the solution is Python; Python does it all; seemed a bit >> simplistic. So I'm not surprised at the slippage, to a "pre-parser" >> and Cython and now , oh, let's add a postfix "!".) >> >> > Wow, you are truly the master of flamebait!
I don't consider this flamebait, I think it's a rather accurate (though blunt) assessment of the uneasieness some people have regarding the preparser. I'd say Sage is between (c) and (d)--just the fact that we're having this discussion means we're not willing to just go and add stuff to the preparser left and right. As for the question at hand, I'm personally not convinced this is useful enough to merit another departure from pure Python. It also risks turning the valid Python expression "x!=120" into an invalid one (unless the rule is something like "! becomes factorial unless it's followed by one, but not two, equals signs...") And then people might expect "x!!" to be the double factorial instead of (x!)!. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an 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 -~----------~----~----~----~------~----~------~--~---