User Tools

Site Tools


fragile_code

Fragile code is any piece of code that has been implemented quickly and that has not been thoroughly thought and tested. It is also any piece of code that clients could wrongly called.

A typical example of fragile code is any piece of code returning a reference on a collection of instances instead of a reference on an iterator on the collection. Indeed, returning a reference on the collection implies that client code could modify the content of the collection without notifying the providing code, thus leading to inconsistencies.

fragile_code.txt · Last modified: 2019/10/06 20:37 (external edit)