Jameson,

This is going on a bit of a tangent regarding my original question, but in 
other postings in this group I have advocated twice for the existence of 
read-only versions of the various mutable types in Julia.  (This is 
somewhat akin to allowing a way for a function to declare that some of its 
mutable arguments are 'inargs').  However, someone always raises the 
objection that any proposed scheme for read-only containers hits a 
roadblock in the case of recursive containers (e.g., an array of arrays-- 
if the outer array is read-only, what about all the inner arrays).  I don't 
have a response to this objection.

-- Steve


On Monday, October 13, 2014 12:44:58 PM UTC-4, Jameson wrote:
>
> I've wanted to try using the high bit of the length of an array (eg the 
> sign bit) as a lock bit as an alternative c. I think that would allow 
> objects to cheaply validate whether an array should not be modified (since 
> it would simply reuse the inbounds check), but also be easy to mask off 
> when looking at the length. I wasn't sure if this would really work, or 
> whether others thought it would be worthwhile.
>
>>
>>  

Reply via email to