Charles, Andrew, et al

<<   There's always the matter that the list can take up a large part of the
thought and discussion on this matter, formulate a nice proposal, submit the
proposal to the list with RFC, and once people are generally satisfied,
submit
the final draft to RT.  Save Carl some headache ;) >>

Having not tried this before, here's an outline. Andrew, do you want to
maintain this, or would you like me to? Does anyone else want to? Will it
work if people post to this list with a subject starting with "RFC 001"...?

It then falls to the maintainer to make decisions it seems. Should they have
censorship authority, or include all pertintent discussion whether they
agree or not?

--Gregg

------------------------------------------------------------

RFC 001 Percent Datatype

===TITLE

Addition of percent! datatype to all versions of REBOL.


===VERSION

Maintainer: Gregg Irwin <[EMAIL PROTECTED]>
Date:       07-Jun-2002
Version:    0.0.1


===ABSTRACT

REBOL has a large number of native datatypes, and many people feel that a
percent! datatype would a useful addition.


===DESCRIPTION

Andrew Martin <[EMAIL PROTECTED]> posted a message to mailing list
suggesting the addition of a percent! datatype to REBOL, and some discussion
followed. The suggestion was made to put together an RFC as a basis for
further discussion, and here it is.



===IMPLEMENTATION

---Declaration Syntax

The proposed syntax is simply a numeric value followed by a percent sign
(%).

    100%
    8.25%

---Operations against other datatypes

What other datatypes can percent! values be used against?


---Result Coercion

Does one operand or the other determine the resulting datatype?

For example, is $100 * 50% the same as 50% * $100?

---Standard notation versus dialect

Does it provide enough value to say:

    $100 * 50%

versus:

    $100 * .5

As someone on the list pointed out, does that lead to the question "50% of
*what*?"

It seems much clearer to say:

    50% of $100

or

    add 8.25% to total

but then you need some way to tell REBOL that this is a new dialect (e.g. a
CALCULATE function that takes a block, like LAYOUT does), or the REBOL lexer
needs to know about the percent! dialect, which may be impractical.

---Precision, accuracy, and rounding

How do you specify the extra information that may be useful, even required.
Two examples I can think of are precision and accuracy (I'm open to better
terms).

Accuracy refers to the number of decimal places a value should maintain.

Precision refers to an "interval" the value should be rounded to. E.g.
eighths (1/8)

Rounding refers to how values should be rounded, when rounding is required.
Examples would be STANDARD (statistical), UP, TRUNCATE, FLOOR, and CEILING.

===REFERENCES




-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to