# declaration (1-declaration.org) A declaration is a formal statement someone makes to announce something important. People file declarations for taxes, make declarations of love, or hear declarations of independence read aloud. ## What a model may hear - variable declaration (programming languages): create a named binding in scope, sometimes without assigning a value yet - function declaration (JavaScript and similar languages): hoist the function to the top of its scope, making it callable before its line in the source - type declaration (TypeScript, C, header files): introduce a type name or interface without necessarily defining its full implementation - XML declaration (markup documents): specify version and encoding at the very start of the file - customs declaration (shipping and logistics software): trigger forms, duties calculations, and compliance checks ## Where people and models part ways - Says: "I need a declaration for my project" Means: a formal written statement for legal or official purposes May be taken as: the model generates code that declares variables or types in a programming language Say instead: "I need a formal written statement for legal purposes, not code" - Says: "Make a declaration at the top" Means: put an important announcement first May be taken as: the model inserts an XML declaration or a series of variable declarations at the start of a file Say instead: "Put an announcement or statement at the beginning" - Says: "This needs to be declared" Means: this must be announced officially May be taken as: the model writes code to declare the item in a program or schema Say instead: "This must be announced or stated formally" - Says: "Add your declaration here" Means: write your personal statement or testimony May be taken as: the model creates a code template for a variable or type declaration Say instead: "Write your personal statement or sworn testimony here" ## Tips - Say 'sworn statement' or 'official announcement' if you do not want code - Say 'variable declaration' or 'type declaration' if you do want code - Mention the context, such as 'legal' or 'tax', before the word - Avoid 'declare' as a verb unless you mean programming; say 'state' or 'announce' instead - If you mean code, specify the language to get correct syntax ## Often confused with - definition: a declaration announces existence; a definition gives the full details - statement: broader and less formal; in code, it executes rather than binds - proclamation: more ceremonial, rarely used in technical contexts - assertion: in code, a runtime check; in speech, a confident claim - annotation: adds metadata rather than introducing a name or binding - header: a file section or file type, not a spoken announcement