Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5317

Re: MakeExpression and color

From Alexey Popkov <lehin.p@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: MakeExpression and color
Date 2011-10-02 06:37 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j690ra$rcm$1@smc.vnet.net> (permalink)
References <j66ebr$hdm$1@smc.vnet.net>

Show all headers | View raw


On 1 Oct, 11:09, John Fultz <jfu...@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@wolfram.com
> User Interface Group
> Wolfram Research, Inc.

Sincerely,
Alexey

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re:  Re: MakeExpression and color John Fultz <jfultz@wolfram.com> - 2011-10-01 07:09 +0000
  Re: MakeExpression and color Alexey Popkov <lehin.p@gmail.com> - 2011-10-02 06:37 +0000

csiph-web