[plt-scheme] cutting and pasting snips
At Wed, 18 Oct 2006 09:08:15 -0400, Prabhakar Ragde wrote:
> Matthias Felleisen wrote:
> > I bet you
> > know that they can do this already with a right-click on the mouse. They
> > are just too lazy.
>
> I don't think this is quite right, is it? Right-click (control-click for
> me, on a Mac) on what appears to be text spelling out a decimal number
> but is in fact a snip representing a rational brings up a menu that lets
> me change the representation to mixed or improper fractions, but there
> isn't anything in that menu offering to convert it to plain text.
> Furthermore, when I type 0.25 or 3/4 as constants in my program, in the
> Definitions window, and then control-click on them, I cannot change the
> representation; they are not snips, and I don't know how to make them
> snips, except to generate them as values in the Interactions window. So
> it appears that snips are snips and text is text. --PR
In the HtDP design-pattern sense, yes. Snip is a different data
definition than text (technically, the text is a special kind of snip,
as is the fraction, but different kinds). But maybe we should consider
changing right-click, so that when you click on text that is a numeric
constant, you get the same menu (and your textual constant becomes a
snip). Ditto when you switch the view of a snip to something that could
actually be written as a text (a mixed fraction or, in the teaching
languages, a decimal)
Robby