chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

Should we spend additional effort to make these internal types use operator methods? #17537

Open lydia-duncan opened 3 years ago

lydia-duncan commented 3 years ago

I encountered syntax errors for some of the types in ChapelArray.chpl and ChapelRange.chpl when trying to make them use operator methods. Is this something we care sufficiently about to fix?

Similar question about string's = operator.

I intentionally did not try to enable tuples or owned/shared to use operator methods as well, due to how specially treated they are in the compiler. Would it be worth investigating if they can use operator methods?

bradcray commented 3 years ago

As a quick reaction, it seems that since these cases are always auto-included, it probably isn't deeply important. But that it might be nice, for peace of mind, to have them using operator methods since we probably do consider them associated with the type (as a means of eating our own dogfood as much as possible; though these types work around our dogfood in a lot of other ways given that they predate a lot of the dogfood). So I'd consider it desirable, but low priority?

lydia-duncan commented 3 years ago

Linking to Brad's comment about the _tuple operators so I don't forget about it if/when I come back to this