# val (0-val.us) Val is a common nickname for Valerie or Valentine. People also say "val" as a quick way to write "value" when talking about what something is worth or what a setting holds. ## What a model may hear - immutable value (Scala, Kotlin, and other JVM languages): Declare a read-only variable that cannot be reassigned, unlike var - value keyword (C# property declarations): Refer to the implicit parameter in a property setter, similar to how value is used - validation prefix (HTML form attributes and web frameworks): Trigger built-in or custom validation rules on user input - value extraction (functional programming and monads): Unwrap or map over a contained value, as in Option.val or similar operations ## Where people and models part ways - Says: "Set val to 10" Means: Put the number 10 in this variable or setting May be taken as: Assume the variable must be immutable and reject later changes, or expect Scala-style declaration syntax Say instead: "Set this value to 10 and let me change it later if needed" - Says: "Check the val" Means: Look at what the current value is May be taken as: Run a validation check or extract from a monad instead of simply reading Say instead: "Tell me the current value of this variable" - Says: "Val is wrong" Means: The number or setting is incorrect May be taken as: Flag a type error about immutability or confuse with a validation failure Say instead: "This value is incorrect and needs to be updated" ## Tips - Say "value" in full when you mean a general number or setting, not a code construct - Specify the language if you mean val as a keyword, since it behaves differently in Scala versus Kotlin - Use "variable" or "setting" instead of val if you need to change it later - Say "validate" or "check" instead of val when you mean to verify something - Write out "Valerie" or "Valentine" if you mean a person's name ## Often confused with - var: mutable variable that can be reassigned, opposite of val in Scala - value: the full word, less likely to trigger keyword-specific behavior - valid: means correct or acceptable, not a stored quantity - eval: execute or evaluate code, not store a value - variance: statistical spread, not a single stored value