Re: What does FullForm[ ] actually do?
- To: mathgroup at smc.vnet.net
- Subject: [mg90700] Re: What does FullForm[ ] actually do?
- From: magma <maderri2 at gmail.com>
- Date: Sun, 20 Jul 2008 06:32:24 -0400 (EDT)
- References: <g54oj0$eu9$1@smc.vnet.net> <g56t9n$3qv$1@smc.vnet.net>
On Jul 19, 10:50 am, AES <sieg... at stanford.edu> wrote: > In article <g5pivs$qb... at smc.vnet.net>, magma <mader... at gmail.com> > wrote: > > > > > AES you certainly have a lot of time to split hair and write about > > it :-) Good for you. > > Point taken, and well put (though I'm not sure whether the final three > words are to be taken seriously, or sarcastically). I've been making > serious resolutions in fact, to spend more of time splitting wood rather > than hair, or at least doing something else involving physical rather > than mental exercise. (My wife strongly agrees.) > > But two final points on this topic: > > 1) Consider Options[] in addition to FullForm[]. > > To my way of thinking, FullForm[] and Options[] are both _queries_ > -- you use them to get information, in preparation for (maybe) doing > something, but not to accomplish something. > > You invoke them to ask, what "What will some expr do?", not to say "Do > this and tell me what you did". This seems even more obvious for > Options[] than for FullForm[] -- yet Options evaluates also. > > And this seems even more relevant when the evaluation of said expr can > readily have other totally unrelated effects and impacts that don't show > up at all in the output of FullForm or Option[], and have nothing to do > with that output. Try some tests, for example, with expr's of the form > expr1;expr2;expr3 -- 1 and 2 seem to get evaluated along with 3, but > you only get information about 3. > > When I ask my banker, WhatsTheMeaningOf["Balance available for immediate > withdrawal"], that does NOT mean "Withdraw that balance and tell me what > it is". > > 2) Couldn't there be an alternative and more reasonable choice for the > operation of FullForm[expr] besides just evaluate expr or don't -- > like,"Show me what the full form result would be _IF_ this expr were > evaluated" -- but don't, for God's sake, evaluate it -- I'll do that > when I'm ready to. oh, no sarcasm at all! I wish I had the time, energy and perhaps efficiency to write all the memorable and less memorable things you write here and elsewhere. In general I would agree with your wife: totally disregarding physical activities, in favour of just intellectual ones, in the long run does not pay and could be lethal. The body is the container of the mind. If the container breaks down, the mind goes with it, regardless how smart one is. To my way of thinking FullForm is a visualization mode, like input- output forms and Standard-Traditional forms. So I think it should have its own menu entry like the other forms, in the Cell/ConvertTo submenu. Or, even better it should have its own little toggle button somewhere on the main Mathematica window: click...you see the FullForm (of the unevaluated expression) click...you see the StandardForm again Who would like that? I would. This can be programmed by the user of course (as most things in Mathematica 6.x), but if it were made by the "Makers", it would be nicer. What do you think WRI ? will you take this little summer homework for your next 6.0x F1 racer ? Regarding your banking example: nowadays I think most people are just happy to see that their bank is still there! If they can even actually withdraw any money from it, it's just super :-) Options : normally you only give as arguments to Options just a symbol, like Plot or Graphics or your home-baked functions. So there very little to evaluate anyway. According to the doc center you can also feed it a complicated expression, but I cannot really come up with a meaningful example right now. So i do not see a real problem with Options expr1;expr2;expr3....oh no, not again please! I thought we split hair to molecular levels just recently :-) Let's look at it this way: every time you want to do something moderately complex with Mathematica, you probably will split it in several sub tasks (expressions), but you are only interested in printing the final result. So all you have to do in Mathematica is subtask1;subtask2;subtask3;lastcalculationsandresult If you really want to see some intermediate result (for debugging purposes for example) you can always insert a print statement as subtask-n. I think this is quite intuitive, don't you? And yes, the semicolon is actually the infix notation for CompoundExpression[] and bla bla bla....but for most people it is just a way to chain-yet-separate different expressions. And they still survive and prosper. Anything more about it risks entering into metaphysics. AES... don't you hear your wife calling? Don't we all hear them in this wonderful mid-summer Saturday afternoon? It's time for me to go split a 14.335 kg water-melon. I wish you and all mathgroupers a pleasant week-end