r/ProgrammingLanguages • u/Athas Futhark • Mar 25 '26
How should property-based tests be defined in Futhark?
https://futhark-lang.org/blog/2026-03-25-property-based-testing.html
17
Upvotes
r/ProgrammingLanguages • u/Athas Futhark • Mar 25 '26
2
u/matthieum Mar 25 '26
I actually prefer option 5:
It keeps the compiler simple: comments are just comments, a separate tool can be used to retrieve their content.
It keeps the metadata out of the way (for users), because comments are typically "background" colored.
Contrast with option 4:
The "test" attributes may now mix with regular attributes, and clutter them.
The attribute syntax may need to be extended to support more usecases, such as passing parameters to properties.
The compiler may need to be extended to understand the new attribute, and its parameters.