1. 13
  1. 8

    Want to call attention to this as not just a well-written article, but a well-written example of how we should be comparing languages. Extensive knowledge of both, comparisons, complex examples, benchmarks, discussions about community, this is a template I want to use going forward.

    1. 3

      I highly recommend reading other Jonathan posts, as well as signing up for his newsletter: https://www.dursi.ca/newsletter.html So many good links and discussion!

    2. 3

      Yes, I said it. Offsets into buffers can begin at 0, sure, but indices into mathematical objects begin at 1; anything else is madness. Also: oxford comma, two spaces after a period, and vi are all the correct answers to their respective questions.

      With sound logic like that, how can I disagree?

      1. 3

        I suppose the author would be disappointed that Chapel has just recently deprecated 1 based indexing.

        1. 3

          @msingle: In our debates on whether or not we should move Chapel away from 1-based indexing for implicitly indexed types like tuples and strings, Dursi’s “as God intended” quote came up with some trepidation (as we have a lot of respect for his opinions). Those who prefer 1-based indexing can take some small comfort in knowing that Chapel’s primary types for data parallelism—its ranges, domains, and arrays—are still expressed using low and high bounds, so lots of code can continue to be written in a 1-based manner if that’s what’s most natural (or –5-based or …).

          All that said, our hope is that users of Chapel will find a lot of goodness in the language’s support for scalable parallelism that’s independent of the 0- vs. 1-based choice (and my recent goal has been to write Chapel code that’s as index-neutral as possible to avoid getting tangled up in such preferences as much as possible).

          1. 2

            @BradCray I’m personally (weakly) in favor of 0 based indexing because all the languages I’ve used professionally use it. I think you’re making a good choice for the ergonomics of the users.

            And numeric indexing is a fairly low-level concept (relative to distributed/parallel programming) and I hope Chapel continues to make progress on that front.

            Thanks to you and your team for all your work!

            1. 1

              Hi @msingle

              in favor of 0 based indexing because all the languages I’ve used professionally use it.

              This was a big part of our reason for switching: That while 0- vs. 1- seemed like a toss-up to us when we started the project, since then, the new languages we’ve cared most about have been overwhelmingly 0-based, with Julia as the lone exception. In addition, even though Chapel had been 1-based for its lifetime, our adoption has been much higher in the C and Python communities than among Fortran and Matlab programmers. So we decided to minimize the pain of the user we have by switching while we could rather than hold to our original course arbitrarily.

              Thanks for your comments!

        2. 3

          For reference, Dijkstra’s answer to that is the best I’ve ever found.

        Stories with similar links:

        1. Should I use Chapel or Julia for my next project? via eddelbuettel 5 years ago | 9 points | no comments