Asynchronous Functions
The Quetzal Language grammar includes the reserved words asincrono and esperar to prepare for asynchronous function support. However, in version v0.0.2 these features are not yet fully implemented in the interpreter.
Reserved Syntax
Section titled “Reserved Syntax”asincrono texto obtener_datos() { // Pending implementation}
texto resultado = esperar obtener_datos()The above code cannot currently be executed; the interpreter will show an error indicating the functionality is not available.
Roadmap
Section titled “Roadmap”- Functions marked with
asincronowill be able to execute operations that return promises or deferred tasks. esperarwill allow pausing the current function until the asynchronous task finishes.- The system will respect the same type rules and error handling as synchronous functions.
Temporary Recommendations
Section titled “Temporary Recommendations”- Implement I/O-dependent operations as synchronous functions and use native modules (e.g.,
quetzal/matematica) while asynchronous support is completed. - Follow roadmap updates to know the availability of this feature.
When the functionality is released, this section will include practical examples and recommended patterns.