On Sunday, 26 July 2015 at 13:06:50 UTC, Kagamin wrote:
The example works like inout without inout, so you can use types with templates and virtual functions.

Does constBack imply to have several static if constructions, function overloadings or template specializations? I mean does this help to reduce the amount of code? And it also sets aside the discussion about casting const away (http://forum.dlang.org/thread/riiehqozpkyluhhif...@forum.dlang.org).

You only hope it's the same.

I believe that generated code does not distinguish constness of object. Moreover, currently inout goes with one code, so it is possible.

All my questions and talks rose from inout restrictions on casting and keeping inside classes and structs. I'm not sure that they are needed. As for now, inout is quite useless for the cases little bit more complex than "inout(A) getData() inout { return data; }". It leads to templates overusage and code duplication. I'm not against inout, I'm for its improvement.


Reply via email to