Am I understanding you right, that you are suggesting that it become impossible 
to declare lower and upper bounds for everything, including ranges, domains, 
and arrays? 100% against this, couldn't disagree more if so. I'll hold off on 
attacking a strawman until I know if that man made of straw is a decoy or the 
real thing.
________________________________
From: Gerald Henriksen <ghenr...@gmail.com>
Sent: Monday, November 4, 2019 6:53:04 PM
To: Brad Chamberlain <br...@cray.com>
Cc: Chapel Sourceforge Developers List 
<chapel-develop...@lists.sourceforge.net>; Chapel Users Mailing List 
<chapel-users@lists.sourceforge.net>
Subject: Re: [Chapel-developers] Feedback requested: Should Chapel use 0-based 
indexing for tuples, strings, etc.? [resent to correct typos]

On Mon, 4 Nov 2019 10:27:14 -0800, you wrote:

>Q: If we were designing Chapel from scratch, or you were approaching it
>    for the first time today, would you be happiest if its indexing was
>    1-based or 0-based?

7 = I'd be happiest if it were 0-based

>Q: Given that Chapel is not brand new, how enthusiastic is your support
>    for making it 1-based or 0-based today?

7 = I feel strongly that it should change to 0-based

>Python clearly stands out from the crowd and is
>0-based.  Rust, Swift, and Go are all (arguably) 0-based as well.  The
>increasing dominance of 0-based languages suggests that we are arguably on the
>wrong side of history.  Julia is one of the few recent exceptions that is
>1-based and its popularity demonstrates that you can be 1-based and successful.

>And again, given that the most common cases of indexing (ranges, domains, and
>array types) support any low bound and don't have a default, programmers who do
>prefer 1-based programming can still (largely) live in that world.

It is obvious with hindsight to say that 0-based has "won", and in
particular any language created today would need to have a very good
reason to go with 1-based.  And math isn't a valid argument given the
total domination of Python in the math and science worlds.

The other thing though that is starting to dominate is the idea of
individual programmer preferences matter less than consistent code
that can be easily understood by any other programmer who needs to
read it with minimal effort.

Hence the rise of languages like Go that enforce strict rules on
layout, to the C++/etc equivalents using things like clang-tidy which
all have the goal of make code re-use, sharing, and maintenance
easier.

Given the industry move to such rules, my feeling is that leaving a
potential inconsistency in the language - the ability for programmers
to arbitrarily choose an indexing scheme - seems a bit out of place
and could in fact hurt Chapel's acceptance.  So unless it massively
breaks things my feeling would be to fix everything all at once and
make the language consistent, so that regardless who wrote the code a
programmer knows if it was written to Chapel 2.* that it uses 0-based
indexing period.  Having code that sometimes uses 0-based and
sometimes uses 1-based is at best asking for trouble and potentially
causing bugs, and at worst possibly convincing people to look to a
different language instead.  A key point is that, particuarly in the
type of fields Chapel seems aimed at, a lot of code is written by
people who are not programmers and so consistency is going to be both
a key attraction to them as well as a way to help them write code with
as few "stupid" bugs as possible.


_______________________________________________
Chapel-developers mailing list
chapel-develop...@lists.sourceforge.net
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fchapel-developers&amp;data=02%7C01%7C%7C281c9786508c431b2b5708d761822d32%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637085084036855150&amp;sdata=bQE2pBkA5LOM599mhRRyX8lI%2B8STTRDMUscCXcDVLyk%3D&amp;reserved=0
_______________________________________________
Chapel-users mailing list
Chapel-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to