- From: Peter Linss via GitHub <sysbot+gh@w3.org>
- Date: Tue, 15 Dec 2020 20:46:14 +0000
- To: public-houdini-archive@w3.org
> If you pass it RGB(1) you can reasonably forward fill GBA with 0,0,1 (sigh) I'm not saying it *can't* be done, I'm saying it **shouldn't**. It violates the principle of least surprise, e.g. any JS programmer unfamiliar with the API will presume you're passing `(1, undefined, undefined)`, not `(0, 0, 1)`. It also violates the TAG design principles regarding optional arguments. I can guarantee you an API like that would never pass TAG review. Furthermore, the original intent of offering an initialization dict was to pass different types of values, e.g. numbers vs percentages. The advantages in using one for optional arguments is for clarity more than brevity. It also allows unspecified argument defaults to be controlled by the receiving function rather than the caller. -- GitHub Notification of comment by plinss Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1014#issuecomment-745556852 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 15 December 2020 20:46:16 UTC