Introduction to Gleam v0.29
On May 23, 2023, Gleam released version 0.29, marking a significant advancement in enhancing its development environment. Gleam, a type-safe and scalable programming language running on the Erlang virtual machine and JavaScript runtimes, has been attentive to developer feedback. One of the most pressing requests was the improvement of tools and editor support. This request materializes today with the introduction of autocompletion.
Autocompletion: A New Era for Developers
Autocompletion is a crucial feature that accelerates development by automatically suggesting module functions, types, and constants during typing. This feature is now available in the Gleam language server, a headless IDE engine that adds Gleam functionality to editors like VSCode, Vim, Emacs, and Helix.
Why is Autocompletion Important?
Developers spend a significant amount of time writing and debugging code. Autocompletion reduces the risk of syntactic errors and improves efficiency by providing contextual suggestions. For instance, a developer working on a complex project can quickly access relevant functions without remembering every detail or sifting through documentation.
Enhanced Build and Deployment Features
gleam run --module Command
With this new release, the gleam run --module command is improved to run the main function from a given module, including those defined in dependency packages. This feature is particularly useful for web frameworks requiring code generation.
Automatic Build Target Detection
Another interesting addition is the automatic detection of the build target for dependency modules. Previously, it was necessary to manually specify whether the module should run on Erlang or JavaScript. Now, Gleam automatically detects the appropriate target, simplifying the workflow.
Cache Optimization
Gleam is known for its fast compilation. This version introduces more precise cache invalidation, reducing build time by recompiling only what is necessary.
Standard Library Improvements
The removal of the try syntax has enabled the introduction of new functions with this name, optimizing the use of the standard library.
Conclusion
Gleam version 0.29 marks an important milestone in the evolution of this promising language. Autocompletion, coupled with enhanced build and deployment features, offers a smoother and more efficient development environment. If you're looking to optimize your IT projects, let's discuss your project in 15 minutes.