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

Functions should be static instead of instance-based. #22

Open
JoshMcCullough opened this issue Mar 19, 2015 · 7 comments
Open

Functions should be static instead of instance-based. #22

JoshMcCullough opened this issue Mar 19, 2015 · 7 comments

Comments

@JoshMcCullough
Copy link

For most functions, it seems I should be able to simply call (for example), geostats.min(values) without creating a geostats instance.

I haven't used the library enough yet to understand when/why I'd want my own instance of geostats instead of just calling its functions statically.

@simogeo
Copy link
Owner

simogeo commented Mar 20, 2015

This could be discussed indeed but you could also imagine to compare several series as follow :

if(serie1.min() < serie2.min()) {
// whatever
}

@JoshMcCullough
Copy link
Author

JoshMcCullough commented Mar 20, 2015

Yes, I think it is pretty simple to make it work both ways by having the instance methods call the static methods. Just a suggestion. 👍

@simogeo
Copy link
Owner

simogeo commented Mar 21, 2015

Would you propose a pull to make it work both ways?

@JoshMcCullough
Copy link
Author

Yes I'll work on it at some point this week.

On Sat, Mar 21, 2015 at 12:13 PM Simon Georget [email protected]
wrote:

Would you propose a pull ?


Reply to this email directly or view it on GitHub
#22 (comment).

@mtralka
Copy link

mtralka commented Dec 1, 2021

@JoshMcCullough Apologies to ping an old issue. I've made GeoBuckets which is a modern take on geostats. All functions are static. Additionally the library is tree-shakable and asynchronous. Please let me know if that fulfills your usage scenario. If not, I'd be happy to accept PRs or make adjustments as needed

@simogeo
Copy link
Owner

simogeo commented Dec 1, 2021

@mtralka see new reference to GeoBuckets in geostats readme file 418113a

@mtralka
Copy link

mtralka commented Dec 2, 2021

@simogeo Awesome stuff! I appreciate the mention. Thank you for your continued work with geostats

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