metaeducation / rebol-issues

6 stars 1 forks source link

TO-OBJECT of an error is physically the same as the error; TO-ERROR of an object yields a fresh value #1588

Closed rebolbot closed 8 years ago

rebolbot commented 14 years ago

Submitted by: meijeru

The asymmetry is probably desired, although complete symmetry would not have harmed...See the note in #1587.

>> e: try [1 / 0]
>> o: to-object e
>> e1: to-error o
>> e =? e1
== false

CC - Data [ Version: alpha 97 Type: Issue Platform: All Category: Datatype Reproduce: Always Fixed-in:none ]

rebolbot commented 14 years ago

Submitted by: Carl

Correct. An error is not an object, but contains an object. So, an error can be constructed from an object, but the opposite is not commonly useful (however we allow it).

Note: Most of the time a concept of symmetry does not prove useful in language definition. It's often a human desire, but as in life, even in quantum mechanics, many operations/conversions are irreversible.

rebolbot commented 14 years ago

Submitted by: meijeru

Thanks for the confirmation.