-
Notifications
You must be signed in to change notification settings - Fork 2
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
Comments
With namespaces and reasonable default arguments. But given that we're in C, we just prefix everything with LAGr_. To drill down a bit:
|
Scott,
I’m sorry I’ve taken so long to reply to your message. It’s been a bit crazy at work these days. Here are my replies to your questions. Let’s get some discussion going in the group and see if we can settle some of these issues be email sooner rather than later.
Yes, we should agree on a prefix since we don’t get to define a name space. I am OK with “LAGr_”.
Do people think we should go all the way to LAGraph_”?
I do not think we should specialize to domain. Its too hard to anticipate all the different domains we need to support nor how the mappings will work. LAGraph_algorithm () does what we need (or LAGr_algorithm).
I like shortened algorithm names, LAGr_bc() rather than LAGr_BetweenessCentrality()
It would be nice to mimic the rules we used in GraphBLAS for argument order (output first than input). But if the group feels applications programmer using C would prefer a different convention, I’m OK with that. I actually do not expect a huge amount of overlap between people using GraphBLAS and people using LAGraph.
…--Tim
From: Scott Kolodziej <[email protected]>
Reply-To: GraphBLAS/LAGraph-Working-Group <[email protected]>
Date: Wednesday, April 8, 2020 at 6:40 AM
To: GraphBLAS/LAGraph-Working-Group <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [GraphBLAS/LAGraph-Working-Group] Function signature convention (style guide) (#5)
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)?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#5 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AATVME247XGX3PEARL6P2ZTRLR5EVANCNFSM4LZDAEEA>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How should signatures be named and structured.
The text was updated successfully, but these errors were encountered: