Re: Keywords reduced Lassi Kortela 20 Oct 2019 09:28 UTC

> Think of a procedure `loggable' on may want to implement with keyword
> arguments. `loggable' shall take a procedure `f' and return a new
> procedure `g', which shall have the same interface as `f' except that
> `g' takes an extra keyword argument, say `logger:'. When `g' is called
> without the `logger:' argument, it shall foward the call to `f''.
> However, when the `logger.' argument is provided, `g' shall log to
> this logger that it is calling `f' before it is doing the actual call.
>
> As `f' may already be a procedure taking keyword arguments, it is here
> where hygiene is helpful because the symbol (!) `logger:' may clash
> with an already existing argument to `f'.

Doesn't this imply that if a program uses two different procedures
taking a `test` keyword, each procedure from a different library, then
the program has to rename one of the `test` keywords on import?

IIRC there were name clashes like this in Haskell and/or Elm due to
similar hygiene concerns. Maybe it was about record field names?