Re: MakeExpression and color
- To: mathgroup at smc.vnet.net
- Subject: [mg121784] Re: MakeExpression and color
- From: Alexey Popkov <lehin.p at gmail.com>
- Date: Sun, 2 Oct 2011 02:35:52 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j66ebr$hdm$1@smc.vnet.net>
On 1 Oct, 11:09, John Fultz <jfu... at wolfram.com> wrote: > I wouldn't call it a compensation. In fact, it was deliberately designed this > way all the way from the time boxes were first introduced. > > It's not at all bad practice to treat presentation and semantics differently. > TagBox is deeply about semantics, and it allows you to link presentation aspects > to those semantics, which is all well and good...but any attempt to build a > semantic layer which depends upon parsing all of the available presentation > information with, at best, heuristics regarding the semantic utility of that > information is going to quickly end in a very frustrating mess. But why in this case the only way to get back original definitions for a symbol goes through parsing of BoxForms backward to "normal" expressions? For example, if I wish to get back original definitions for symbol 'f', I am forced to use the following hack and it seems that there is no other way to get them (all *Values functions does not respect the difference between immediate and delayed definitions): MakeExpression[#, StandardForm] & @@ ToBoxes[Definition[f]] > > Sincerely, > > John Fultz > jfultz at wolfram.com > User Interface Group > Wolfram Research, Inc. Sincerely, Alexey