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
then define Traits for basis and openness. IIUC, In this way you could define impl for functions which have different implementations depending on e.g. openness, like len, with full compile time monomorphization and no runtime type checks as in our existing two implementations
i imagine something like
pub trait DifferentialBehavior {
fn len(&self) -> u64;
}
impl DifferentialBehavior for ZBHO {
fn len(&self) -> u64 {
self.end - self.start
}
}
// and same exact impl for OBHO
In fact you may be able to combine this strategy with your zero sized type parameters to reduce duplication and instead write something like
impl<T: HalfOpen> for Interval<B, T>
although I'm not sure how you specialize on just one type. probably still works.
if you can do this I have to change the part of the paper explaining the drawbacks to the Rust implementations include runtime checks =)
The text was updated successfully, but these errors were encountered:
Consider a third Rust implementation:
then define
Trait
s for basis and openness. IIUC, In this way you could defineimpl
for functions which have different implementations depending on e.g. openness, likelen
, with full compile time monomorphization and no runtime type checks as in our existing two implementationsi imagine something like
In fact you may be able to combine this strategy with your zero sized type parameters to reduce duplication and instead write something like
although I'm not sure how you specialize on just one type. probably still works.
if you can do this I have to change the part of the paper explaining the drawbacks to the Rust implementations include runtime checks =)
The text was updated successfully, but these errors were encountered: