Attributes offer the ability to add structured, machine-readable metadata information on declarations in code.
Structures, interfaces, enums, methods, functions, fields, constants, and modules can be the target of an attribute. The metadata defined by attributes can then be inspected at compile-time using the Reflection APIs. Attributes could therefore be thought of as a configuration language embedded directly into code.
Attributes in V are declared inside square brackets
 before the declaration.
If multiple attributes need to be declared, they must be separated by
You can also declare attributes on multiple lines:
Attributes can have a value that is specified after the attribute name:
Field attributes of structures or interfaces are specified after the field declaration:
The special syntax of the
if attribute allows you to specify a condition under which the
definition will be compiled:
For custom options:
You also can declare string attribute: