[policy] Prefer object-based APIs (instance methods) over class-based (static methods)
See original GitHub issueSome 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:
- Created 7 years ago
- Comments:17 (17 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With the issues created, above, I believe that we’ve identified all of the exercises that need adjustments.
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!