chapel-lang / chapel

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

How should distributions be named? #23118

Closed bradcray closed 8 months ago

bradcray commented 1 year ago

In a meeting today, it was proposed that coming up with new names for distributions would be preferable to choosing between Block (what we've traditionally used) and block (an obvious alternative now that it's a record). This issue is designed to serve as a place to capture such suggestions in hopes of resolving this question.

Sample use cases for where these names come up include:

This question applies broadly to any distribution names we'd like to stabilize eventually, where that list might include:

Ideas gathered so far (ignoring casing for now):

e-kayrakli commented 1 year ago

I have been reasonably happy with Block, especially when it was limited to dmapped clauses or new dmap arguments in some more heroic/older codes. Though with BlockDom/BlockArr types it was somewhat of an outlier internally.

With new implementation of distributions, it is reasonable to consider camelCasing the name into block, but I find it a bit too general of a name. Moreover, BlockDist module and blockDist user-facing type is symmetrical to List/list, Set/set etc. So, I am for blockDist. My second choice would be keeping Block and pose it as "distributions are PascalCase in our style guide. It is a heavy concept and I think it would be a reasonable rationale. Though Block would still suffer from generality and asymmetry with List et al.

blockCyclicDist is a bit of a mouthful. We can consider blockCycDist/blkCyclicDist could be obvious alternatives to cut down on number of letters. blockCycDist is more palatable to me.

replDist could be considered instead of replicatedDist, but I wouldn't champion it.

lydia-duncan commented 1 year ago

blkCycDist is also an option, though I prefer blockCycDist myself

RedHatTurtle commented 1 year ago

I find most distribution names good except for Private and Replicated which confused me a lot when I was learning and testing them out.

Private distributed arrays aren't really private, they are globally accessible from any locale, in fact their most defining characteristic is that you can only have 1 element of the array on each locale. I'm terrible at naming but I think something like Single would already by a great improvement.

Replicated distributed arrays on the other hand are kinda private, in the sense that it's not trivial to access a replica on another locale, so maybe this should be called Private? Also since it doesn't offer any synchronization support, not even at initialization, calling it Replicated is a bit confusing. I get that the domain is replicated across all locales but domains are just a tool to manage arrays. Most of the time my focus is on the behavior of the array, not the domain.

When I need to explain this distribution to other people I tell them the "Replicated" dist creates private unsynchronized copies of the array. I can't think of a better name than Private and although I think it's a terrible idea to change the meaning of an existing keyword that drastically I think having good names is more important and this is kind of a last chance to change it with 2.0 on the horizon. Also, I have no idea how many projects could be impacted by changes like these.

RedHatTurtle commented 1 year ago

With new implementation of distributions, it is reasonable to consider camelCasing the name into block, but I find it a bit too general of a name. Moreover, BlockDist module and blockDist user-facing type is symmetrical to List/list, Set/set etc. So, I am for blockDist. My second choice would be keeping Block and pose it as "distributions are PascalCase in our style guide. It is a heavy concept and I think it would be a reasonable rationale. Though Block would still suffer from generality and asymmetry with List et al.

I strongly support the idea of adding the Dist suffix to distribution record names to make them less generic terms, I imagine that was the rationale behind the module names already.

Someone correct me if I'm wrong but as I understood the reason to switch from PascalCase to camelCase is the distributions are being converted from classes to records? I'm fine with either as long as all distributions use the same format. I have to admit that distributions are a lot deeper concepts than records and classes so ignoring that naming convention seems pretty reasonable too.

blockCyclicDist is a bit of a mouthful. We can consider blockCycDist/blkCyclicDist could be obvious alternatives to cut down on number of letters. blockCycDist is more palatable to me.

I don't think that I type the distribution names enough to care if they're long so I would rather have the full name.

bradcray commented 1 year ago

Someone correct me if I'm wrong but as I understood the reason to switch from PascalCase to camelCase is the distributions are being converted from classes to records?

@redhatturtle: That's correct.

I have to admit that distributions are a lot deeper concepts than records and classes so ignoring that naming convention seems pretty reasonable too.

That's part of what we've been wrestling with as well. :)

Thanks for the thoughts and feedback!

lydia-duncan commented 8 months ago

Same question as #22904

bradcray commented 8 months ago

Yep, thanks. We settled on blockDist here as the naming convention for standard distributions.