At Tue, 7 Feb 2017 21:54:40 -0800 (PST), Tim Hanson wrote:
> https://docs.racket-lang.org/net/imap.html#%28def._%28%28lib._net%2Fimap..rkt%2
> 9._imap-port-number%29%29
> 
> Does this make imap-port-number a kind of global variable?

Normally, `imap-port-number` would be used with `parameterize` to
localize a setting:

 (parameterize ([imap-port-number 12345])
   (imap-connect ....))

I agree that an optional keyword argument would be better in this case,
and it's just that the parameter predates keyword-argument support.
(It's a relatively old library.) Arguments like `#:tls?` were added
later.

A `#:port-number` argument that defaults to the parameter value would
work well.

At Wed, 8 Feb 2017 01:38:05 -0800 (PST), Tim Hanson wrote:
> P.s. For that matter couldn't folder also be optional, defaulting to "INBOX"?

That also sounds to me like a fine improvement.

-- 
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