On Tuesday, 16 October 2018 at 22:59:50 UTC, Dennis wrote:
[snip]

The first thing to consider for invalid tokens, at least for me, would be to either have popFront set empty to true, or set front to some value representing a parsing error. A programming language parser almost certainly needs to output helpful error messages, so the latter is likely a better approach.

Whatever iterates through the range could then throw an appopriate exception when it encounters an error token.

I'm not saying your approach is wrong though. It's probably just a matter of taste.

Reply via email to