Iota
Salih Dincer
salihdb at hotmail.com
Fri Aug 5 07:24:27 UTC 2022
On Thursday, 4 August 2022 at 21:31:02 UTC, Paul Backus wrote:
> Strictly speaking, you don't even need that; all you need is a
> range that generates the natural numbers, and you can write
>
> naturals.take(n)
>
> ...to get the equivalent of iota(n).
>
> That said, I don't think you have to aim for total minimalism
> to avoid generality creep here. You just need to know what
> iota's purpose for inclusion is, so that you can say "no,
> that's not iota's job; use generate/recurrence/something else
> instead" when someone proposes an overly-general enhancement.
I agree! It's like rangeTo and downTo in Kotlin, right? The
simpler, the better!
SDB at 79
More information about the Digitalmars-d
mailing list