On Saturday, 24 January 2015 at 23:19:11 UTC, ketmar wrote:
people that are new to D aren't used to D lambdas, so it's fairly common.
Oh, I am aware, but I didn't thought it would be necessary in this pace.

if you'll stay with D, you'll find yourself dreaming about such handy thing in another compiled languages very soon. ;-)

I don't consider to use any other language as long as I have a choice :-)

But in the end, my one short and beautiful solution

auto myRange = iota(start, end).map!foo;

changed into something quite klumsy:

auto myRange = iota(start, end).map!(x => foo(cast(ParameterTypeTuple!foo[0])x));

which I think is against the philosophy of D as it turns away the eye of the reader from what is really going on, especially if previous constraints ensured that start and end-1 are of the correct type :-(

But ok, still far, far better than what would be neccessary in C++
  • using the full range of u... Dominikus Dittes Scherkl via Digitalmars-d-learn
    • Re: using the full r... H. S. Teoh via Digitalmars-d-learn
    • Re: using the full r... bearophile via Digitalmars-d-learn
    • Re: using the full r... Tobias Pankrath via Digitalmars-d-learn
      • Re: using the fu... Dominikus Dittes Scherkl via Digitalmars-d-learn
        • Re: using th... ketmar via Digitalmars-d-learn
          • Re: usin... Dominikus Dittes Scherkl via Digitalmars-d-learn
            • Re:... ketmar via Digitalmars-d-learn
              • ... Vlad Levenfeld via Digitalmars-d-learn
                • ... bearophile via Digitalmars-d-learn
                • ... Dominikus Dittes Scherkl via Digitalmars-d-learn
                • ... Tobias Pankrath via Digitalmars-d-learn
                • ... Dominikus Dittes Scherkl via Digitalmars-d-learn
                • ... bearophile via Digitalmars-d-learn
                • ... Dominikus Dittes Scherkl via Digitalmars-d-learn
                • ... ketmar via Digitalmars-d-learn
                • ... Dominikus Dittes Scherkl via Digitalmars-d-learn

Reply via email to