Skip to main content
decorator

decorator

1 7.0
A tool that adds behavior to a function, for example logging, without changing its code
  • noun
  • /ˈdɛkəreɪtər/
  • Specialized
translation icon : decorador (programación)
  • The terms interior designer and interior decorator are usually used interchangeably.

Examples

  • It's really not that different from C#, but sometime in the early 2000s architecture astronauts got their hands on it, and now "Java" has become associated with crufty XML files and heavyweight object decorator factory factory factories.

    Blog text (29)
  • Get a fucking decorator.

    Fiction book (1996)
  • Yeah, I see what your decorator was trying to do here.

  • FREEZE: I should have been a decorator.

    Fiction book (1997)
  • I don't care if they come in with their decorator.

    Fiction book (1992)
  • Uh, your decorator called.

  • Get a decorator.

  • I say give them an opportunity to participate... in decorating their own cells with their own personal decorators.

  • Objects seem to have invisible but significant auxiliary functions that we are not aware of consciously, but that allow them to thrive—and on occasion, as with decorator books, the auxiliary function becomes the principal one.

    Blog text (2)
  • The function's behavior was changed by using a decorator that logged its outputs.

Compounds

A person who plans and chooses the colors, furniture, and fabrics for the inside of a home or office

A person who plans and arranges a home's rooms and furniture

A person who arranges furniture, colours, and things to make rooms look nice and work well

Surface Forms

decorator singular
decorators plural

Morphology

decorator = decorate (semi-transparent) = decorate + or

Morphologically an agent noun from 'decorate' using '-or', but the programming sense is a technical metaphor (a 'wrapper' that 'decorates' behavior) not directly obvious to non-technical learners.

Etymology

Decorator (in programming) uses the same idea as decorating a room: it 'wraps' a function to add features like logging or checks without changing the original code. The word comes from Latin decorare 'to adorn', so a programming decorator adds things around a function in the same way a decorator adds things to a room.