You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An array-backed immutable sequence would natively support random access Natural -> Maybe a and would be very fast indeed, provided it could be made safe such that the array was fully encapsulated by the data type. This would mean that no public construction patterns should allow wrapping of an array: arrays should be fully existentialized behind a series of exported minimal interactions. As an example:
This interface would receive a Consumer that would itself receive a Consumer representing an add invocation, so a valid argument might do something like:
Each add would result in the internal array being updated, and after withAdd was finished, some flag would be flipped to specify the array is no longer candidate for update, so if someone did something accidental and caustic, like leaked add into an atomic reference, add could not be used after initialization to violate the immutable properties of the Vector.
This data type would likely be eventually supplanted by a BAMT, so it may or may not be worth adding in the short term.
The text was updated successfully, but these errors were encountered:
An array-backed immutable sequence would natively support random access
Natural -> Maybe a
and would be very fast indeed, provided it could be made safe such that the array was fully encapsulated by the data type. This would mean that no public construction patterns should allow wrapping of an array: arrays should be fully existentialized behind a series of exported minimal interactions. As an example:This interface would receive a
Consumer
that would itself receive aConsumer
representing anadd
invocation, so a valid argument might do something like:Each
add
would result in the internal array being updated, and afterwithAdd
was finished, some flag would be flipped to specify the array is no longer candidate for update, so if someone did something accidental and caustic, like leakedadd
into an atomic reference,add
could not be used after initialization to violate the immutable properties of theVector
.This data type would likely be eventually supplanted by a BAMT, so it may or may not be worth adding in the short term.
The text was updated successfully, but these errors were encountered: