keller-mark / anyhtmlwidget

Bringing core concepts from anywidget to R
https://keller-mark.github.io/anyhtmlwidget/
Other
5 stars 0 forks source link

Should API use kwargs or a `values` list argument? #10

Closed keller-mark closed 1 month ago

keller-mark commented 1 month ago

The kwargs are nice but mean that users cannot choose value names that clash with existing (or future) named args like esm, width, height, and mode.

widget <- AnyHtmlWidget$new(esm = esm, mode = "static", count = 1)
# vs
widget <- AnyHtmlWidget$new(esm = esm, mode = "static", values = list(count = 1))