Conversions to string!
REBOL has fairly complex rules for conversions to string. For example, it assumes that an issue, #abc should format without the # but money, $1.23 should always display the $.
It does not seem consistent. The reason: it was optimized for usability in the common cases. But, in R3, it may be time to change the rules.
Perhaps the question can be reduced to simply this: do we want to-string! to not add the datatype formatting?
As a clear example:
>> to string! 1
== "1"
>> to string! $1
== "$1.00"
Should we change that?
>> to string! $1
== "1"
What we need is to create a table of conversions and examine each one to decide what is best. [I could use some help on that, because my time is so restricted with R3 coding.]
Keep in mind that these converters are available:
| to-string | low level conversion to a string
|
| form | high level conversion to string
|
| format | conversion with specification (new in R3, but more to do)
|
| mold | conversion to REBOL source format
|
17 Comments
|