r/ProgrammingLanguages • 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
18 Upvotes

9 comments sorted by

View all comments

Show parent comment

4

u/Athas Futhark Mar 25 '26

I largely agree, although you are being a bit too harsh on option 4. Attributes are intentionally transparent to the compiler and will be passed through unmolested, without the compiler having to understand what they are, and without having to be extended in any way. It's essentially just a way of attaching arbitrary structured information to program constructs. They are also used rarely enough that test-specific attributes likely won't get mixed up with other attributes.

2

u/matthieum Mar 26 '26

I largely agree, although you are being a bit too harsh on option 4

That's on me for assuming attributes were much more deeply integrated in the compiler.

I do like the looser coupling.