Good catch; I agree that it would be better if `gzip` returned the target path, in all cases.

There is another change I'd make to that signature: currently, arg `out-file` is optional, of type `path-string?`, defaulting to `(path-add-extensionin-file".gz"#".")`.  In a backward-compatible way, I'd instead make it optional with type `(or/c #f path-string?)`,  and defaulting to `#f`, with an `#f` value then resulting in `(path-add-extensionin-file".gz"#".")` behavior.  That way, code calling `gzip` can pass in the "use the default" value.  This pattern becomes more useful when there is more than one optional argument (whether or not it uses keywords), but it's helpful even with just the one optional argument.  It also keeps the signatures in the documentation a little simpler.

This might be getting into the "art" side of API design.  We can come up with some good stylistic guidelines for API design, probably including guidelines that cover the above, but not comprehensive guidelines.

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to