Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
Advice
1 vote
5 replies
86 views

I know we can have: <?php abstract class ExtendMe{ abstract public function implementMe(){} } Can we enforce trait usage? <?php trait MyTrait{} abstract class ExtendMe{ abstract use ...
9 votes
1 answer
611 views

Let's say I have an abstract class with a public abstract method. If I make that method virtual instead of abstract (i.e. provide a default implementation), is that a breaking change? I think not ...
Best practices
0 votes
11 replies
223 views

first I must says that I hate templates.... it makes unreadable complex code.... not speaking about 5000000 lines long error messages, with 10000 possibilities and that takes ages to understand for ...
10 votes
4 answers
759 views

In C++, there are some widely used zero-size base classes used for the purpose of "tagging" subclasses, for example boost::noncopyable. Is there any that is used to mark a class non-...
Ben Voigt's user avatar
  • 286k
4 votes
2 answers
148 views

I have an abstract base class that used to accept a service via constructor injection: export abstract class BaseEditEventClass<T> extends BaseFormClass { constructor(protected _service: ...
-2 votes
2 answers
196 views

I have an abstract Python class with a concrete method: class AbstractFoo(abc.ABC): def append_something(self, text: str) -> str: return text + self.create_something(len(text)) @...
Chriki's user avatar
  • 16.6k
0 votes
1 answer
99 views

This question is likely already asked, but I am not satisfied with the answers. I add the link for reference. Previous Question Now, coming to the point, I have six different abstract classes which ...
1 vote
1 answer
52 views

I'm working on a Django project where I have an abstract Post model that serves as a base for two concrete models: RentalPost and RoomSeekingPost. Both of these post types need to have multiple images....
3 votes
1 answer
787 views

I'm having trouble implementing a threaded Binary Search Tree in C++. I have a non-threaded tree completely implemented (see below code). What I'm having difficulty with is setting the threads to ...
1 vote
2 answers
140 views

I want to create a class that is called from other methods and change the implementation of that class based on some context (like params): Abstract class: class PdfRenderer(ABC): # Something else ...
1 vote
0 answers
113 views

In my class, I have some methods that can be overridden by subclasses, but do not need to be. I like to test my project and generate a coverage report using coverage.py. Because the method of the ...
3 votes
1 answer
87 views

The ObsoleteAttribute can be used in .NET to indicate that a given member or type is going to be removed in a future version. It will trigger compiler warning 612 or 618 on the code that uses the ...
3 votes
5 answers
225 views

I have classes ProgramA and ProgramB that derive from abstract class Program. I sum them up into an array std::vector<Program*> and I pick a random one from there that runs for awhile. #include &...
Awed2's user avatar
  • 71
-1 votes
0 answers
51 views

I don't understand why this code compiles but it gives execution error: Parameter specified as non-null is null: method kotlin.collections.CollectionsKt___CollectionsKt.minus, parameter at kotlin....
zplot's user avatar
  • 33
1 vote
4 answers
173 views

Let's say I have the following classes: public abstract class Animal { public abstract void talk(); } class Dog extends Animal { @Override public void talk() { System.out.println(&...

15 30 50 per page
1
2 3 4 5
...
357

AltStyle によって変換されたページ (->オリジナル) /