We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

Back to home

The biggest semantic mess in Futhark

Source

Hacker News

Published

TL;DR

AI Generated

The 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.