nesting
Word family
Synonym discussion
Sense: verb/3
All four words describe putting one thing inside another, but they differ in structure and purpose. 'Nest' (verb/3) specifically implies a hierarchical parent-child arrangement at multiple levels, like folders inside folders or code blocks within code blocks. 'Embed' suggests fixing something deep within a surrounding medium — a stone embedded in concrete, or a video embedded in a webpage — with no implication of further levels. 'Insert' is the simplest action of placing something into a space, like inserting a coin into a slot, without hierarchy. 'Enclose' surrounds something on all sides, like a letter inside an envelope, focusing on containment rather than levels. 'Contain' is the most general, meaning to hold within, but does not specify how. In practice, a programmer nests HTML tags (<div><p>text</p></div>), embeds a video in a page, inserts a line of code, encloses a return address in tags, or says a box contains 12 items.
Common collocations
Etymology
The word 'nest' comes from Old English 'nest', meaning a bird's nest or snug resting place, which traces back through Proto-Germanic '*nistaz' to the Proto-Indo-European root '*nisdos', meaning 'a seat' or 'place where one sits down'. Adding the '-ing' suffix turns it into both a gerund noun and a present participle adjective. The earliest recorded use of 'nesting' for bird behaviour dates from the 14th century. The meaning of objects fitting inside one another (like tables or bowls) emerged in the early 1800s, and the computing sense of embedding code or data within a structure appeared in the mid-20th century as programming languages developed hierarchical structures.
First known use
13th century
13th century, in the meaning defined at intransitive sense 1