On 6/14/21 10:17 PM, mw wrote:

> I think there is another convention (although it's not formally
> enforced, but should be) is:
>
> -- `obj.front() [should be] const`, i.e. it shouldn't modify `obj`, so
> can be called multiple times at any given state, and produce the same
> result

In other words, front() should be "idempotent".

To the OP, there is the following presentation that is related and touches on similar concerns:

  https://forum.dlang.org/thread/diexjstekiyzgxlic...@forum.dlang.org

Ali

Reply via email to