question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[policy] Prefer object-based APIs (instance methods) over class-based (static methods)

See original GitHub issue

Some exercise test suites force the use of static methods exclusively (e.g. nth-prime); others force the use of objects (e.g. anagram). Is there a preference for one paradigm vs the other? Having users switch back and forth between the two while working through exercises seems unnecessarily confusing.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
jtiggercommented, Mar 8, 2017

With the issues created, above, I believe that we’ve identified all of the exercises that need adjustments.

1reaction
jtiggercommented, Dec 21, 2016

That’s perfect, @stkent… it’s the exact intent of the label — exercism/discussions#96. When you see things like this, please, you are fully “blessed” to take action!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python's Instance, Class, and Static Methods Demystified
This tutorial helps demystify what's behind class, static, and instance methods in Python.
Read more >
Use Cases for Static Methods in Java - Baeldung
Instance methods are resolved polymorphically based on the runtime type of the object. On the other hand, static methods are resolved at ...
Read more >
Class method vs Static method in Python - GeeksforGeeks
A class method can access or modify the class state while a static method can't access or modify it. In general, static methods...
Read more >
c# - What is better? Static methods OR Instance methods
FromARGB() which behave slightly contructor-like for value types. In general, any method that doesn't touch an objects state (and therefore is more class- ......
Read more >
When Should I Use a Static Class and When Should I Just ...
You can create static methods on instantiatable classes as well. ... greatly prefer it over being forced to create an object for no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found