jackfirth / resyntax

A Racket refactoring engine
Apache License 2.0
51 stars 10 forks source link

->* #:rest to -> ... #235

Closed sorawee closed 4 days ago

sorawee commented 2 months ago

Many contracts use ->* with #:rest to contract a function with a rest argument.

However, ->* is difficult to read.

Since Racket 6.5, -> supports ..., which can be used to support the rest argument as well.

Since -> is much easier to read, when applicable, ->* #:rest should be rewritten to -> ....

jackfirth commented 4 days ago

The arrow-contract-with-rest-to-arrow-contract-with-ellipses rule implements this, though I don't remember when I wrote that one.

sorawee commented 4 days ago

You even had #130!

jackfirth commented 4 days ago

Great minds think alike 🙂