Skip to main content
to decorate

to decorate

5 7.7
To change how a function or class works by adding a small extra function around it
  • verb
  • /ˈdɛkəˌreɪt/
  • Specialized
translation icon : decorar
  • decorating cakes
  • decorating your home
  • decorating her room

Examples

  • And I will see you tomorrow where I'm going to be helping Mark decorate his flat.

  • Later that day, the girls and I made cupcakes, and they had a great time decorating them all.

    Blog text (20)
  • At home, Connie decorated her bracelet with glitter glue.

    Fiction book (1995)
  • CallerInfo attributes are specifically designed to decorate the optional parameters of a method, which can then be used by the .NET runtime to inject the caller information.

    Blog text (26)
  • In programming, you can decorate a function with additional functionality using a decorator.

  • To enhance the behavior of a method, programmers often decorate it with special annotations.

  • When you decorate a class, you modify its methods to add new features.

Antonyms

87 3.5

Make a device or feature stop working

How Modified

override
58 6.7
to extend
  • Specialized
10 6.2
to decorate
  • Specialized
5 7.7
to augment
52 5.3
to wrap
729 1.0

Surface Forms

decorate infinitive
decorated past
decorated past participle
decorating present participle
decorates third person singular

Morphology

decorate = decor (semi-transparent) = decor + ate

The programming sense is a domain-specific metaphorical extension of 'to add ornament/feature'; the morphological structure is the same but the meaning is specialized.

Etymology

Decorate in programming is a modern, metaphorical use of the same Latin root decorare 'to make beautiful', and a decorator is like an ornament placed around a function that changes how it works. A helpful way to remember this is to imagine putting a decoration around a function to add new behavior.