Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function signature convention (style guide) #5

Open
mcmillan03 opened this issue Apr 1, 2020 · 2 comments
Open

Function signature convention (style guide) #5

mcmillan03 opened this issue Apr 1, 2020 · 2 comments

Comments

@mcmillan03
Copy link
Member

How should signatures be named and structured.

@ScottKolo
Copy link
Contributor

With namespaces and reasonable default arguments.

But given that we're in C, we just prefix everything with LAGr_.

To drill down a bit:

  • There's a good chance that LAGraph will start to modularize and segment by domain. If algorithms were truly unique to an application area, I would suggest we add that to the signature (e.g. LAGr_ML_ or LAGr_NetSci_). However, many algorithms are unlikely to be used by only a single domain area. Maybe they can have their own version in their domain tailored specifically to their area, but we risk a lot of code duplication if we assume that from the start.
  • Regarding argument ordering, do we want to use output-first like GraphBLAS? It would seem reasonable to do so.
  • From a broader style and philosophy perspective, should we keep names short (LAGr_bc) or long (LAGr_BetweennessCentrality)?

@tgmattso
Copy link
Collaborator

tgmattso commented Apr 10, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants