I'd like to propose -> ~> as an alternative combo for purity Inference
I think we will generally write type signatures far less than actual function code. Particularly given many type annotations will be auto-generated by IDE.
=> Seems like a nice operator we may want to use elsewhere and it's easy to type.
Using ~> is just as clear, but demotes effectful function signatures to a slightly less easy to type version to free up => for grander uses.
~> is a lovely looking operator that has a certain wiggly effectfulness inherent within it. Effectful functions are a bit approximate, a bit convoluted, all this is beautifully expressed by the meandering curve of the Tilda and it's association with ~=.
On the plus side, ~> is slightly easier to type (on a US keyboard) than => or -> since it doesn't require changing the state of the shift key in the middle
The last point about how ~> is squiggly and implies an impurity is a really nice point IMO
I find that really hard to differentiate at a glance.
So I don't like -> paired with ~>
Fair, it's very font dependent
Exactly
Look, you make a fair point... I did think it was worth at least bringing it up.
And I do wish I had more wiggles in my programming.
Lots of discussion about functional and fast in roc, sometimes I feel fun really takes a backseat :stuck_out_tongue_wink:
I would be totally for it if it was more distinct in many fonts
On my 65% keyboard the tilde is on the same key as escape so I have to press fn to access tilde which makes it annoying to type. Of course I could remap it to remove that annoyance, but I suspect there are other people in similar situations who would be frustrated.
Tbh I like this. It's true that the tilda is a bit hard to identify with some fonts, but a good syntax highlighter could help with that.
I don't know if Font ligatures are still "cool", but I always end up installing FiraCode and enabling Font ligatures. So here's how -> ~> and => look with FiraCode + font ligatures:
Last updated: Jun 16 2026 at 16:19 UTC