Questions tagged [design-patterns]

The tag has no usage guidance.

4 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

How do I erase the “shadow-world” antipattern?

In this antipattern, you have level-0 constructs of the language, which are then abstracted over by creating level-1 constructions, and these level-1 abstractions are abstracted over by creating level-...
0
votes
0answers
29 views

What are the pros and cons of these two coding patterns/structures? And do they have a formal term?

I have traditionally been doing things like this: function test() // A { if (/* conditions */) return true; else return false; } Of late, ...
0
votes
0answers
27 views

Finite state machine for a modified traffic controller

Consider a traffic light controller for an intersection of a main street and a smaller street. Both streets are one-way streets. The intersection has two traffic lights, one for each street. In normal ...
0
votes
0answers
14 views

What is the difference between a composite and a leaf in a composite pattern?

I think the initial is sometimes called a compositor. Essentially from the diagrams of what I have seen so far from the design pattern is that compositors are more complex in its attributes while the ...