The biggest semantic mess in Futhark
Source
Published
TL;DR
AI GeneratedThe article discusses the challenges faced by the Futhark programming language, particularly in handling size types. Size types allow functions to impose constraints on parameter sizes, but issues arise when using sizes as term-level variables. The article delves into the complexities of determining size values at runtime, especially in scenarios like creating multidimensional arrays without actual elements. The language's evaluation model involves distinguishing between applying functions for value and shape, requiring intricate machinery to always know the full shape of types. Despite efforts to formalize the size-based type system, bugs related to sizes have been a significant issue in the interpreter, highlighting the need for further refinement in handling size parameters.