Understanding Elixir's Strong Arrows in Gradual Typing

255
clicks
Understanding Elixir's Strong Arrows in Gradual Typing

Source: elixirstreams.com

Type: Video

The article explores a new concept in Elixir's journey towards gradual typing called 'strong arrows'. This approach resolves some of the challenges associated with gradual typing, specifically the trade-off between the propagation of a dynamic type and discrepancies between compile-time and runtime types. A strong arrow is defined as a function that, when given input outside of its declared type, will result in an error. This allows Elixir to more accurately determine expected function outputs and maintain type integrity. The discussion also addresses confusion surrounding the return type of a `debug/1` function and the implications of strong arrows on its type inference.

© HashMerge 2024