On Tuesday, 6 November 2012 at 16:09:59 UTC, H. S. Teoh wrote:
On Mon, Nov 05, 2012 at 11:17:08PM -0800, Jonathan M Davis
wrote:
On Tuesday, November 06, 2012 08:49:26 Andrei Alexandrescu
wrote:
> On 11/6/12 4:36 AM, H. S. Teoh wrote:
> One quite simple approach would be to define (on the
> contrary) .peekFront, which means "yeah, I'd like to take a
> peek at the front but I don't plan to store it anywhere".
That's not what "peek" means in any of the languages I've seen.
Peek just means "show me the element, but don't pop it off".
It does not have to do anything with how the caller uses the
result.
It would be very confusing to have both front and peekFront.