[REBOL] Re: percent! - new datatype request
From: jason:cunliffe:verizon at: 12-Jun-2002 14:15
Hi.. Interesting the twists and turns this has taken so far..
Although I am PRO a new REBOL percentage datatype, I don't buy into this
argument that it's so essential to VID.
VID needs documentation and example. But above all it needs a stronger set of
useful modern interfaces for resizing, nesting tables, spacers, sizers, split
They need a friendly dialect/syntax suitable for reading and writing GUI
percent% as datatype is surely the smallest part of that problem.
Yes it might be nice, but the description of relative/absolute widths etc, could
equally well be handled by a block syntax.
Anyway, 'OF' seems like a valid addition and is very readable.
Perhaps a new operator is more important than the datatype, and thus may be also
easier to explore.
>> 50% x 20%
bothers me.. I argue don't mix pair values and percent.
>> 50% of 20% of something
ok now does make sense.
Whatever happens with implementing % percent datatype, thinking about 'OF' has
interesting consequences.. For example consider this:
>> position: 400x20
>> table: 120x30
>> type? table
>> 0.4 * table
** Script Error: Cannot use multiply on decimal! value
** Near: 0.4 * table
>> 50% of xy ;<< wishful thinking
...or if percent is not available, we can just use
>> 0.5 of table
>> 0.5 of table/x
>> half: 0.5
>> half of my-profit all of my-love
>> position image-box half height of screen
In layout dialect we want to be smarter add more readable [x y width height area
What y'all think??