Type | Issue | Status | submitted | Date | 31-Jul-2015 05:36 |
---|---|---|---|---|---|
Version | r3 master | Category | Evaluation | Submitted by | fork |
Platform | All | Severity | major | Priority | normal |
Summary | LIT-PATH! evaluation changes type but reuses series data |
---|---|
Description |
Consider the following: >> code: [path: 'foo/bar] == [path: 'foo/bar] >> result: do code == foo/bar >> same? result second code == false >> append result 'baz == foo/bar/baz >> code == [path: 'foo/bar/baz] Something unsettling is that you now have a single series "backing store" of data being aliased as two different types. In one place, that data is a LIT-PATH!, and in another place that data is a PATH!. Modifying one modifies the other. Yet they are not the "same". While there's currently nothing mechanically preventing the aliasing of series data as more than one value type, it seems unsound to me, and should likely be prohibited. When the evaluator processes an ANY-BLOCK! that is lit-quoted to produce an unquoted value, it probably needs to COPY/DEEP it (which copy-on-write semantics might be able to mitigate the cost of). |
Example code |
Assigned to | n/a | Fixed in | - | Last Update | 31-Jul-2015 05:37 |
---|
Date | User | Field | Action | Change |
---|---|---|---|---|
31-Jul-2015 05:37 | Fork | Description | Modified | - |
31-Jul-2015 05:36 | Fork | Ticket | Added | - |