Timeline for Why does this pattern with Plus not work for numbers?
Current License: CC BY-SA 3.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 7, 2013 at 18:54 | vote | accept | einbandi | ||
Feb 6, 2013 at 10:47 | history | tweeted | twitter.com/#!/StackMma/status/299107127711109120 | ||
Feb 6, 2013 at 0:40 | answer | added | Michael E2 | timeline score: 15 | |
Feb 6, 2013 at 0:34 | history | edited | einbandi | CC BY-SA 3.0 |
edited title
|
Feb 6, 2013 at 0:32 | comment | added | einbandi | Okay, maybe someone can give some real insight into this at some point. At the very least, this will serve as a future reference. Maybe a post with some experiments and comparison between different functions and patterns, including what you said about the nature of such fundamental functions, will be enough to have this answered. | |
Feb 6, 2013 at 0:24 | comment | added | rm -rf♦ |
No, I don't think you should delete this question. I personally think it would be good to have this answered, as I do not know the actual answer either, beyond what I've written. I've just never had a need to alter something as fundamental as Plus , but a comprehensive answer that also touches upon what might break if hypothetically one were to do this would be really great to have.
|
|
Feb 6, 2013 at 0:21 | comment | added | Leonid Shifrin | I think that this is a rather important detail, and perhaps having this question around would be nice, since people come back to this every now and then. Just a day ago there was a similar question on Mathgroup. It is just this kind of detail where pretty much all one can say is "you do want to know about the mere fact of it, but you don't want to know anything deeper than that". | |
Feb 6, 2013 at 0:19 | history | edited | einbandi | CC BY-SA 3.0 |
edited title
|
Feb 6, 2013 at 0:17 | comment | added | einbandi |
I somehow thought it was interesting to find out where this point, to which they can be modified is, no matter if this is useful or not. But now I'm thinking of deleting the question. The fundamental difference between how Plus works for numbers and symbols was just something that seemed strange to me.
|
|
Feb 6, 2013 at 0:14 | comment | added | rm -rf♦ |
Operations like Plus and Times are deeply wired in the system and cannot be modified beyond a certain point, as they're essential to pretty much everything else. For example, try: Unprotect@Plus; Remove@Plus; 1+1 Look ma! No Plus ! But you still get 2. However Plus[1,1] remains unevaluated.
|
|
Feb 6, 2013 at 0:13 | comment | added | Leonid Shifrin |
IMO, this internal mechanics of Plus should not be relevant to the user. To me, this seems one of those internal details which can not serve you well even if you know them. Plus , Times and perhaps a few more fundamental functions have deviations from the standard evaluation semantics, so that certain buit-in rules like the one you illustrated apply before the user-defined rules. The whole fact that this was done in this way shows that those rules were considered very fundamental by developers, which brings the question again: how would the knowledge of exact semantics here be helpful?
|
|
Feb 6, 2013 at 0:11 | history | edited | einbandi | CC BY-SA 3.0 |
added 45 characters in body
|
Feb 6, 2013 at 0:07 | comment | added | einbandi | Have you read the question? I'm not interested in workarounds or whether or not it's a good idea to do this (of course it isn't!). I thought mabye someone could explain to me what happens so I get a better understanding of what Mma does. | |
Feb 6, 2013 at 0:04 | comment | added | Leonid Shifrin | And here is a very simple answer: don't do it. | |
Feb 6, 2013 at 0:02 | history | asked | einbandi | CC BY-SA 3.0 |