Supercharged Labels – Gleam v1.4.0
Gleam v1.4.0 enhances code readability and developer experience with new shorthand syntax, improved error messages, updated build tools, and expanded support for JavaScript, among other features.
Read original articleGleam v1.4.0 has been released, introducing several enhancements aimed at improving code readability and developer experience. A new shorthand syntax for labelled arguments allows developers to omit variable names when they match the parameter names, streamlining function calls. Additionally, two new code actions have been added: one to convert existing code to the shorthand syntax and another to automatically add labels to function calls. The language server now supports completion for labelled record fields and provides signature help, displaying function documentation and highlighting required arguments during calls.
The build tool has been updated to ensure that warnings are emitted each time a project is built, addressing issues with cached warnings. Improvements in Erlang typespec generation have also been made to silence new warnings introduced in Erlang OTP27. The documentation generation process now includes a target flag for specifying the platform, and the compiler has enhanced fault tolerance, allowing it to analyze code even when errors are present.
Error messages have been improved for common syntax mistakes, and the string concatenation operator can now be used in constant expressions. Support for JavaScript bit arrays has been expanded, and the language server can now list document symbols for better navigation. Lastly, case correction suggestions and a new code action for converting assert expressions into case expressions have been implemented, further enhancing the development experience in Gleam.
Related
Elixir Anti-Patterns
The document discusses code-related anti-patterns in Elixir v1.18.0-dev, highlighting issues like comments overuse, complex 'with' expressions, dynamic atom creation, long parameter lists, and namespace conventions. It provides examples and refactoring suggestions to improve code quality and maintainability.
Using Use in Gleam
Erika Rowland, erikareads, explains the benefits of the "use" expression in Gleam v0.25, replacing "try" for clearer and concise code. It simplifies callback functions, enhances readability, and streamlines error handling.
Gleam v1.3.0 – Auto-imports and tolerant expressions
Gleam v1.3.0 update includes auto-imports, tolerant expressions, enhanced completions, import cycles diagnostics, syntax warnings, arithmetic support, and JavaScript bundler hints. Contributors improved functionality and user experience significantly.
Enhancing Your Elixir Codebase with Gleam
Gleam is a statically typed language for the BEAM platform, enabling type safety in Elixir projects. The article details integrating Gleam for managing student enrollments, emphasizing testing and robustness.
Check Maybe Div by Zero for Gleam
check_maybe_div_by_zero is a Gleam tool that detects potential division by zero in code, ensuring expected behavior. It integrates with CI systems and supports multiple targets, enhancing code quality.
It's not just a matter of taste; we used to deal with language particulars which were objectively hard for humans to adhere to, for no good reason. No one seriously advocated for semi-colons as a matter of aesthetic preference.
Gleam just looks like a modern language. It looks like it was made for humans to deal with, given what we now know about the human visual system, memory, habit formation, etc.
I hope Gleam will find more sponsors for Louis and the core contributors, especially one from a stable company !
On this side, have you thought about publishing paid educational content to both pay the bill and still contribute to Gleam’s growth ? I don’t know for others but I would love to pay for something like Luca Palmieri’s book Zero To Production in Rust but in Gleam !
Related
Elixir Anti-Patterns
The document discusses code-related anti-patterns in Elixir v1.18.0-dev, highlighting issues like comments overuse, complex 'with' expressions, dynamic atom creation, long parameter lists, and namespace conventions. It provides examples and refactoring suggestions to improve code quality and maintainability.
Using Use in Gleam
Erika Rowland, erikareads, explains the benefits of the "use" expression in Gleam v0.25, replacing "try" for clearer and concise code. It simplifies callback functions, enhances readability, and streamlines error handling.
Gleam v1.3.0 – Auto-imports and tolerant expressions
Gleam v1.3.0 update includes auto-imports, tolerant expressions, enhanced completions, import cycles diagnostics, syntax warnings, arithmetic support, and JavaScript bundler hints. Contributors improved functionality and user experience significantly.
Enhancing Your Elixir Codebase with Gleam
Gleam is a statically typed language for the BEAM platform, enabling type safety in Elixir projects. The article details integrating Gleam for managing student enrollments, emphasizing testing and robustness.
Check Maybe Div by Zero for Gleam
check_maybe_div_by_zero is a Gleam tool that detects potential division by zero in code, ensuring expected behavior. It integrates with CI systems and supports multiple targets, enhancing code quality.