Release of Elixir Drops 0.2.0 with Custom Types Support

211
clicks
Release of Elixir Drops 0.2.0 with Custom Types Support

Source: solnic.dev

Type: Post

Peter Solnica recently released Elixir Drops version 0.2.0, which includes significant improvements to its type system. This new version introduces the ability for users to define their own custom types and to create compositions of these types. The article showcases examples of how to define simple custom primitive types, such as age and name, and emphasizes how validation logic can be encapsulated within them. Additionally, the article explains how to create complex maps and union types, and leverages the new `Drops.Types.Number` to define union types supporting multiple data types. The author shares his excellent experience with Elixir's straightforward approach to library code and the ease of refactoring. Solnica also hints at upcoming features for version 0.3.0, including i18n support and an improved casting system.

© HashMerge 2024