Find the documentation for 'readonly' properties in Hack. Explain how to define and use a 'readonly' property, including any key characteristics or limitations mentioned in the documentation.
Navigate to hacklang.org. Click on the 'Hack' link to access the Hack documentation section. Locate the specific section or page within the Hack documentation that discusses 'readonly' properties. Extract the information on how to define and use 'readonly' properties. Identify any key characteristics or limitations of 'readonly' properties as described.
Successfully navigates to the Hack documentation section. Locates the documentation for 'readonly' properties. Explains that 'readonly' properties are defined using the `readonly` keyword before the property type and name (e.g., `public readonly int $x;`). States that 'readonly' properties can only be initialized once, either at the point of declaration or within the constructor of the class. Mentions that 'readonly' properties cannot be modified after initialization, even within the class methods, except for specific scenarios like cloning or unserialization if applicable and documented.