std.v2020.algorithm etc[ WAS: Is run.d going to be expand for runtime and the phobos library?]

jmh530 john.michael.hall at gmail.com
Wed Jun 24 14:49:00 UTC 2020


On Wednesday, 24 June 2020 at 14:17:17 UTC, Joseph Rushton 
Wakeling wrote:
> [snip]
>
> I'm struck that no one AFAICS has suggested the following 
> alternative: instead of `tail`, to allow popFront() (and if 
> implemented, popBack()) to return an `Option!(ElementType, 
> None)`.
>
> [snip]

This is similar to what I had said previously [1] about cursors 
(though Steven disagreed with my initial take). However, it 
sounds like an Option is more elegant.

[1] 
https://forum.dlang.org/post/nudkmmtoeqtznuorneev@forum.dlang.org


More information about the Digitalmars-d mailing list