Brad Anderson:

I like Adam's input range idea. It gives you the best of both
worlds, I think. It clears the conflict between ints and lengths
using an interface.

I don't like it a lot. I think I'd like two differently named functions. I am not sure.


One last thought. If array() accepted a second argument for an
allocator you could just use a lot of existing code and slap an
allocator into that final argument on your UFCS chain.

auto arr = iota(1, 5).joiner(only(7, 13)).array(allok);

This is a nice idea. What about std.array.uninitializedArray and std.array.minimallyInitializedArray?

Bye,
bearophile
  • Re: API bearophile via Digitalmars-d
    • Re: API H. S. Teoh via Digitalmars-d
  • Re: API Brian Schott via Digitalmars-d
  • Re: API Walter Bright via Digitalmars-d
    • Re: API MattCoder via Digitalmars-d
    • Re: API Andrei Alexandrescu via Digitalmars-d
      • Re: API Walter Bright via Digitalmars-d
        • Re: API Andrei Alexandrescu via Digitalmars-d
  • Re: API Idan Arye via Digitalmars-d
  • Re: API Brad Anderson via Digitalmars-d
    • Re: API bearophile via Digitalmars-d
  • Re: API ed via Digitalmars-d
  • Re: API Steven Schveighoffer via Digitalmars-d
  • Re: API Yota via Digitalmars-d
  • Re: API Andrei Alexandrescu via Digitalmars-d
  • Re: API Dmitry Olshansky via Digitalmars-d
    • Re: API Steven Schveighoffer via Digitalmars-d
  • Re: API Byron via Digitalmars-d

Reply via email to