|Version||r3 master||Category||Evaluation||Submitted by||fork|
|Summary||LIT-PATH! evaluation changes type but reuses series data|
Consider the following:
>> code: [path: 'foo/bar]
== [path: 'foo/bar]
>> result: do code
>> same? result second code
>> append result 'baz
== [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).
|Assigned to||n/a||Fixed in||-||Last Update||31-Jul-2015 05:37|