Best practices for logical const

Meta jared771 at gmail.com
Sat Feb 15 20:35:52 PST 2014


On Sunday, 16 February 2014 at 03:26:42 UTC, Steven Schveighoffer 
wrote:
> I'm not sure what you are asking, because the answer I want to 
> give is so trivial :)

Then I don't know what we're arguing about. I'm saying that if 
you pass mutable data to an inout function, inout effectively 
acts as logical const within that function, as the compiler 
doesn't allow you to modify the inout function argument but it is 
safe to cast away inout. Do you agree or disagree with this?


More information about the Digitalmars-d mailing list