[REBOL][datatypes] Re: Tuples versus Deciamls
[1/1] from: maximo::meteorstudios::com at: 13-Jan-2004 12:36
I'd like the print tuple to print only the length of the tupple defined, or at least in probe. the reason is that if you try to do any kind of data conversion to/from tuple values, you end up with very disconcerting answers, trying to GET the fact that internally a tuple is sort of the child of an integer and a series... now I know all of this but it took me at least a few hours trying to get a universal tuple converter to/from tuple, integer, decimal, string, block... there really should be a switch in all to-xxxx functions which allow lenient conversions. I have a host of as-xxx function which mimic many to-xxx functions but which try to FIND a value of the appropriate type instead of plainly crashing. these are much more usefull... Like as-decimal, which supports decimal values even if there is something more preceding or trailing the value... which is often the case like a simple space:
>> to-decimal " 2e44"
** Script Error: Invalid argument: 2e44 ** Where: to-decimal ** Near: to decimal! :value -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.