Loop-switch sequence

id: loop-switch-sequence-271-3516076
title: Loop-switch sequence
text: A loop-switch sequence is a programming antipattern where a clear set of steps is implemented as a switch-within-a-loop. The loop-switch sequence is a specific derivative of spaghetti code. It is not necessarily an antipattern to use a switch statement within a loop—it is only considered incorrect when used to model a known sequence of steps. The most common example of the correct use of a switch within a loop is an inversion of control such as an event handler. In event handler loops, the seque
brand slug: wiki
category slug: encyclopedia
description:
original url: https://en.wikipedia.org/wiki/Loop-switch_sequence
date created:
date modified: 2023-02-12T18:27:39Z
main entity: {"identifier":"Q391199","url":"https://www.wikidata.org/entity/Q391199"}
image:
fields total: 13
integrity: 13

Related Entries

Explore Next Part