Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[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 views etc.. They need a friendly dialect/syntax suitable for reading and writing GUI layouts. 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
== 120x30
>> type? table
== pair!
>> 0.4 * table
** Script Error: Cannot use multiply on decimal! value ** Near: 0.4 * table
>> 50% of xy ;<< wishful thinking
== 60x15 ...or if percent is not available, we can just use
>> 0.5 of table
== 60x15
>> 0.5 of table/x
== 60
>> 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 margin indent] What y'all think?? ./Jason