by cptroot · 9mo ago · 0 comments
> You never annotate a function signature unless you want to for documentation purposes.
so it sounds like function annotation is still an option for the purposes of communication, just no longer required in all cases.
[type Shape
[Circle f64]
[Rect f64 f64]
Point
]
[sig test_sig : Shape -> Float]
[fn test_sig [shape]
[match shape
[Circle r] [* 3.14159 [* r r]]
[Rect w h] [* w h]
Point 0.0
]
]
Unfortunately it seems like this doesn't currently work as expected when I use it in the playground, so I'm going to go file an issue