- From: Joe Pea via GitHub <sysbot+gh@w3.org>
- Date: Sat, 28 Dec 2024 04:44:24 +0000
- To: public-fxtf-archive@w3.org
There'd be something nice about the non-mutable (non-`*Self`) methods, in that returning a `*ReadOnly` interfaces allows immutability to be enforced when the performance tradeoff is acceptable. With methods like `clone()` and `copy()`, and methods that create new instances or write to targets, immutable behavior can be applied, but not strictly enforced. You could `return mat.clone().rotateSelf(10)` and someone might think that modifying the returned value will do something when in fact it does not. For people who choose to have immutable designs, the non-`*Self` methods would seem to be desirable if they were to return `*ReadOnly` interfaces, but right now `clone()` and `copy()` patterns would be nicer if the non-`*Self` methods continue to return mutable interfaces. We should at least go one direction or the other, rather than stay stuck in the middle. -- GitHub Notification of comment by trusktr Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/587#issuecomment-2564178255 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 28 December 2024 04:44:25 UTC