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
We need to think about this carefully in light of wanting to use Pony style references. The immediate solution that occurs to be is that we need a special "bit-reference" type that encodes a bit-shift and mask, so you would effectively encode an address, and a start and stop bit range:
struct bitReference {
*word address,
int shift
}
where the dereference operation would be:
((*bitref.word) >> shift) & 1
The real reason I think C++ fails, is because it actually uses the concrete dereference '*' directly, instead of implementing Stepanov's Readable, Writeable, Mutable Concepts. With dereference becoming a type-class you can totally avoid proxy iterators. It is probably too big a change with all that code already out there for C++...
The text was updated successfully, but these errors were encountered:
The real reason I think C++ fails, is because it actually uses the concrete dereference '*' directly, instead of implementing Stepanov's Readable, Writeable, Mutable Concepts. With dereference becoming a type-class you can totally avoid proxy iterators. It is probably too big a change with all that code already out there for C++...
Agreed.
The problem is the assumption that a reference type is an address in memory. Instead we need to have a typeclass for operations of reading from and writing to the object referenced.
Section 3 of the paper you linked to notes that abstraction of referencing is also necessary for example when the referenced objects exist across the network, which may very well be the case with Actors.
@shelby3 Another C++ mess:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0022r0.html
We need to think about this carefully in light of wanting to use Pony style references. The immediate solution that occurs to be is that we need a special "bit-reference" type that encodes a bit-shift and mask, so you would effectively encode an address, and a start and stop bit range:
where the dereference operation would be:
The real reason I think C++ fails, is because it actually uses the concrete dereference '*' directly, instead of implementing Stepanov's Readable, Writeable, Mutable Concepts. With dereference becoming a type-class you can totally avoid proxy iterators. It is probably too big a change with all that code already out there for C++...
The text was updated successfully, but these errors were encountered: